This has been the case for literally decades. Social media sites aren't (technically) supposed to allow users under 13, and porn sites have obviously had this concern since forever.
This law does in fact make parental controls better by forcing the social media companies to change how they present content to minors.
I don't totally disagree that the impetus should be on the social media companies instead of the OS but i also genuinely don't see a problem with a voluntary adult/minor flag with a consistent API either