Windows, and any other OS will be illegal in California unless it implements this.
Apple, for one, is headquartered in California.
So, the OS wont work until the user verifies their age somehow.
Moreover, even if an OS somehow could know the users age - that doesn't automatically mean all other software that exists automatically reads it and responds to it as necessary. Does the law compel anyone making software to recognise this?
Did you not read my comment? Anyone writing software for an OS that implements this, can be sued (in California) if their application ignores the API signals from the OS and allows access to age-restricted content.
Or is your argument really "this won't affect linux, so it doesn't matter" ? At the very least, FOSS development by anyone in California will be a problem, as the law quite literally names "persons" as potentially liable.
The reality remains, the US is the most thirsty for this kind of thing. Not the least.