Making it illegal could make it taboo, kids are less likely to talk about it in fear of "getting caught" and less talking means less usage.
This is not like porn which is a solitary activity: on social media you have to be social and let everyone know… at least for traditional actually-social media, not content-consuming apps like TikTok.
It's similar to alcohol usage: you can't stop it completely, but also you don't have 50% of kids bringing it to school.