My opinion: The other way around puts the onus for violating the law on the OSes.
Also the telemetry is the same either way:
"Are you over 18?" Yes/No is basically the same signal to the server as "This content is rated 18+" followed by downloading more content or not.
It's also vulnerable to basically the same brute force age guessing which should be outlawed, e.g., "This pixel is for 5+, that one is 10+, ....." Until you get the user's age, but that also should be considered a violation by the website and not the OS, in my book.
Policing the OS is like policing credit card companies for kids buying cigarettes. It could work but it's not really their responsibility to check.