This guide will tell you, How to Hide Your Steam Game Activity.
First, you have to open Steam and then click on the name of your profile on the top of your screen and then click on Profile from the drop-down menu.
After reaching your profile page, you have to click on the Edit profile button and then click on My Privacy Settings on the right side of your screen. Now the privacy settings that you can change will appear on the left side of your screen. Click on the Game details and change it to private.