Open Telegram and search for a bot that reports IDs
Tap the search field at the top of Telegram and type @userinfobot. Open the result. Tap START at the bottom, or send it the word /start.
It replies with a few lines. One of them is your ID, written as Id: 123456789. That number is what you need.
These ID bots are made by other people, not by us. They can see your name, your Telegram username and whatever you send them, so send nothing else. Never paste a join code, a password or a bot token into one.