It doesn't make sense to move this function to the OS because so long as the OS remains under the user's control, any signal from the OS has no value because the OS reports whatever the user wants it to report.
At any rate, why legislate operating systems when all of the harm comes not from computers themselves but rather from certain websites? And there are already mature solutions for controlling access to specific websites. Client-side parental controls for internet access have existed for decades, dating back to Surfwatch from the Win95 era. A credit card requirement would also effectively impose an age filter.
The law acknowledges that. It doesn't require actual verification. That's why people are saying it's just a parental controls law and not an ID verification law.