* You create your account as part of your license renewal and have a normal-ass login. As part of that your account is manually marked as being 18+ (or just your age) by the person behind the counter.
* The government publishes a few public certs which will be used to verify.
* Then you go to your account page and click the button to generate a certificate signed by one of the government's private keys. The cert is valid for say 7 days.
* You upload the cert to the website you want to access and the website validates it.
Done. You make it illegal to provide your tokens to minors like it's illegal to provide booze to minors. Good enough for government work. It's literally just an EV cert.
The problem gets a lot easier when you have a country wide IRL ID system already in place and can write laws.