When you install WhatsApp, most settings come open to everyone: numbers you don't know can see your profile photo too, anyone who wants to can add you to any group they like, and everyone can track your last seen. Most people use it for years without ever changing these.
Yet the key to all of them is gathered in a single menu: Settings → Privacy. Once you apply the steps below, only the people you want will see you, instead of anyone who reaches your number. None of these settings sends a notification to the other person, so you can change them with peace of mind.