Here's the thing, open source is big business for the likes of Canonical and Red Hat. There is no need for any of this to be in the linux kernel, or even in the window system. It is a pretty trivial feature to implement as a simple add on, and those who sell Linux based OSes and support contracts will ensure that they can continue to do business in a market as large as California. The law is clearly not perfect, but it's also not awful. My understanding is that it does not mandate any kind of age verification, only age declaration. The idea is to let a porn website or similar ask the browser "Is the user 18 or older" and get a response based on an age provided when the user account was created.
If you accept that there is content on-line which small children should not access, then it follows that some type of age verification beyond "Click here only if you're old enough" is necessary. Something like this, baked into the browser and/or OS, is kind of the least bad option. When you look at the kind of AI age verification garbage some web sites and apps are starting to do, an age signal baked into the OS actually starts to look pretty good. If this gets adopted widely and sites start to take advantage of it to skip the "I'm totally old enough" button, I'll be happy to tell my OS what my birthday is... Jan 1, 1970.