That’s easier said than done for internet products.
As far as I see it there are 2 broad options, which I exaggerate here.
You could either regulate companies such that they aren’t allowed to engage in addictive and potentially harmful behaviors (including gacha games and maybe gambling games)
OR
Require everyone who accesses the internet be known and registered in such a way that any service could verify that said person has the legal permission to access that service.
This is just work in IT.