As a society we believe that, even though we have freedom of speech, minors should be gated from certain content, and that certain content should not be 100% public and in your face. This was fine in the early days of the internet because you weren't being shoved content up your screen as you had to go look for it.
With surveillance ads one of the ways to monetise your eyeballs and attention is for platforms to sell time on your screen and shove content into your brain.
Selling eyeball access of children and adults to the highest bidder (commercial companies, political parties, foreign agents) creates a logistical problem of "protecting children" from some of the content (but not all). To be fair, I would also like to be protected from all the crap content.
Solution one: stop selling access to insert content into the feeds I've decided to follow, or in the middle of the videos I'm watching. Either it's part of the content and the creator inserted it there, or the platform can't insert extra (unwanted) content.
I can already hear all the people whose livelihoods depend on ads and surveillance: we can't do that, we need to track you, profile you, sell your personal data and sell ads so we can be rich (and destroy democracy?). OK, that doesn't make me happy but here's another solution: sell phones which by default are configured to respect children's privacy: no tracking, no collection of personal data, no ads, no access to "adult" content.
The easiest option is to have a code associated with each phone which can be given to an adult when the device is being purchased and allows them to change settings on an "age content" menu, where you can select age brackets or content filters locally. Or, even better, just make the parents set it up when the phone is first booted (easy!). If the first boot process can spend 5-10 menus trying to get my consent to collect personal data, track me and profile me, it can also have one more menu for setting up content filters?
Alternatively, and because every solution nowadays must have an AI, have a local AI, running on the phone, no data collection, no cloud service associated, which checks your age locally (by looking at your face?) and allows adult users to configure/setup the age brackets to be used for content and apps.
Adult users can have tracking and ads and porn. Children (and other users who want it) can be protected. Let adults install whatever software they want and see whatever content they want by letting them choose locally on their phone (or their browser) which kind of protection should be in place regarding data collection and profiling, and regarding content/ads being displayed.
Finally, app stores providing apps can also be made responsible for not having apps with surveillance, tracking, backdoors, malware, etc. Isn’t that why they collect a fee? This is not a freedom of speech problem like for content. In either case, requiring people to provide identification documents is far from an ingenious solution, unless the goal was to improve surveillance. Then it would really be very ingenious to provide this as a "solution".
Trying to finding other "solutions" which are good for corporations and surveillance states…is "incentive misalignment" of probably good intentioned engineers implementing software that is bad for society.