By default, only people you have saved as contacts can see your number. You can message anyone in private chats and groups without exposing it, and you can tighten the setting further.
Changing it
- Open Settings.
- Go to Privacy and Security.
- Choose Phone Number.
- Set Who can see my phone number to Everybody, My Contacts or Nobody.
- Set Who can find me by my number, which is a separate question and worth setting deliberately.
Both settings accept exceptions, so you can hide the number from everyone while still showing it to a chosen few.
The limit of the setting
If somebody already knows your number and has saved it in their contacts, they will see that the account is yours. Nothing in the privacy settings can undo that, because they had the information before Telegram was involved. What the setting controls is whether people learn the number through Telegram, not whether people who already have it can recognise you.
Being reachable without it
Set a username. It gives you a public address, t.me/yourname, that strangers can use to message you while the number stays hidden. This is the intended arrangement for anyone publishing a contact point: the number stays private and the username does the work.
Updated