Why do you think that's the only way?
Privacy laws and constitutional protections vary widely across democracies and - in my estimation - for very good reason.
Australia, Canada, Ireland, New Zealand, the UK, and the US have no government-issued compulsory identity cards for all citizens.
I would even prefer it to give my info to Elon Musk. He may be crazy, but he wouldn't be interested in my stupid opinions.