Many users do not desire to interact with underage users for many reasons. Some underage users may wish to opt out of seeing 18+ users so they may bond with people closer to them in age or perhaps for safety. I think a functionality to
- mark your account as 18+
- hide content from accounts who didn't mark self as 18+
- hide content from accounts who marked self as 18+ would be very useful to those users and set a higher standard of personalized experience for users engaging with social media.
Worst case scenario, what you suggest is no worse than what we currently have.
On the reverse side, enforcing underage users can be done with device-level parental controls (and if they can circumvent that, well maybe it's time for them to experience the real Internet).
Voluntarily separating adult material is a no-brainer. If nothing else, this eases the volume of moderation.
What we don't need is shitty government id programs tapped by shady websites.