While it's true that you can't keep kids from seeing content that mabey isn't appropriate, social media companies haven't exactly done themselves any favours by failing to have any kind of rating system for their content.
I think a far better solution would be for content to be rated, with controls in place so rating filters could be applied, similar to how tv has ratings for content, and in some cases has the ability to set a parental lock for some content.
For sites like youtube, which has so much good educational content, as well as a lot of stuff that mabey you don't want your 12 year old kids to see, it would be far better than an outright ban if you could set a filter to only show say, G or PG rated content, and you could be sure your kids weren't going to be exposed to clips of people getting blown up in a war or something.
This might mean that all content would have to be rated "Unrated" until it was reviewed and rated by either a human or sufficiently accurate AI bot, but this should be something that be increasingly possible to do.
For comments, it might be be necessary to disable them, or similarly have them get rated in real time by a bot.