The operating system needs to be involved because its the easiest set of actors to penalize for non-compliance.

There are essentially two desktop operating systems, Windows and macOS. Linux is a decimal point and too fractured to worry about.

There are essentially two mobile operating systems, Android and iOS. And while Android is fractured, Google still has reasonable control they can exert.

This is (weirdly) the smart way to do this type of law.

Make the consumer OS providers add an age signal. That property can be bound to an account with the inability to change it.

Behold, "universal enough" parental controls which will require only a handful of lawsuits to litigate.