We don't seem to have an issue with the government requiring businesses to check ID for alcohol, tobacco, porn (in the physical world), and firearms. Movie theaters check ID for rated R movies if you appear to be under 17. In fact, a lot of online retailers of alcohol and tobacco now require ID to be verified at purchase instead of at delivery.
Facebook/Twitter/TikTok/etc are not the digital town square; the most charitable analogy for them is they they are merchants in the town square. And the rules should still apply to them.