The Internet should be Unrated and thus Adults Only by default. Just like public spaces. (Would you allow an 8 year old to wander New York City unattended? Arguments can be made for more controlled spaces but...) Have a website and want the chance for kids to see it? Advertise in the headers that it's moderated and intended to be a given rating. Various indexers can pick that up. Complaints can be forward to relevant…
This is exactly the opposite of the way public spaces actually work, and the way that public spaces actually work is the very justification for laws like this in the first place! You've just taken their exact rationale and imagined a world that would lead that metaphor to the opposite conclusion.
In most of the real-life US, you can't put porn on a billboard, you can't sell it in a supermarket, and you can't wear it on a shirt. You can't go out naked in public, and you can't engage in public sexual activity.
If you do want to buy porn or go into a strip club, you have to show ID and go into a distinctly-not-public space behind closed doors, often without street-facing windows lest people in the public space be able to see inside.
The fact that this is how public spaces work is why these laws are written the way that they are—by analogy to real public spaces vs real adults-only spaces.