How about laws that prevent social media websites from pushing harmful content users didn't ask for? How about forcing them to abandon the practices and dark patterns that result in those platforms being addictive? How about putting executives behind bars when their algorithms are shown to cause mental health and body image issues in children? These platforms know that what they're doing is hurting people, but they don't care because they're profiting from it. These companies intentionally designed systems that are harmful and user-hostile. They've got algorithms that seek out and target people's vulnerabilities. They ignored repeated warnings from their own researchers, and actively concealed evidence of the harms they were causing. We don't have to let them do it. Not to children or anyone else. Facebook isn't going to die off if they go back to showing people only things their friends and family post. It might even get more popular. They might make fewer billions though and that's unthinkable to them.
There are a lot of things that can be done, but the government isn't interested because actually solving the problems social media causes isn't going to give them the power they're actually after and it could cause them the bribe money they get from these companies.
So, what actual rules do you want to make in service of these desirable outcomes? They have to be clear and straightforward enough that they can't be just gotten around with clever lawyers or argued past the point of meaninglessness by shills posing as philosophers. I do not like the idea of everyone having to show ID online (or even much in real life), but I can see why it's popular because it's very easy to explain and understand.
Not saying these are impossible questions to answer or get right in a law, just that there are more things to think about than which component you decide to show data inside.
The law would define a social media platform. Maybe something like: The term “social media platform” means a website or internet medium that— (A) permits a person to become a registered user, establish an account, or create a profile for the purpose of allowing users to create, share, and view user-generated content through such an account or profile; (B) enables 1 or more users to generate content that can be viewed by other users of the medium; and (C) primarily serves as a medium for users to interact with content generated by other users of the medium. [https://www.law.cornell.edu/definitions/uscode.php?def_id=42...]
If your SaaS app met that definition of a social media platform it would be illegal for you to show content in an infinite scroll window. Because your application targeted business users who paid for the service, people would be less likely to sue you. Maybe it'd be worth it to you to include infinite scroll anyway. Companies knowingly break the law all the time after calculating that even on the off chance they get caught the fines they'd face will probably be less than the profit they'd make. The larger your platform got, the less worth it breaking the law could become and of course if the public felt the fines were so low as to be ineffective, the law could be amended to increase the fines.
The law could even allow some platforms to include harmful content like infinite scrolling if certain conditions are met. For example, platforms could be allowed to include infinite scrolling if they require a credit card to sign up, and they display a warning explaining that the platform uses infinite scrolling which has been determined to be harmful by promoting addictive and compulsive behaviors, and it provides an option to disable that feature. Still, it's probably better to widely ban those kinds of practices that serve no purpose other than driving engagement/addictive behavior. We can just decide as a society that we value people's mental health more than maximizing tech billionaire profits.