how would you ban it?

I don't want the russian-style ban enforced by ISPs

Probably punishing companies who pay YouTube for ads would work

Much if not all of Europe already has ISP level bans. If they can use those bans against football streaming sites, why not Facebook?

And actually I think just banning them from conducting any business, accepting payments/etc, would be mostly sufficient. They could continue to operate at a loss, but it would put American corps at such a disadvantage that domestic social media might be able to compete, and enforcing regulations against domestic companies should be far more feasible.

Your name sounds finnish... Finland ISPs have only primitive dns based blocklists which can be bypassed by any kid, they need to purchase dpi-capable hardware to block websites by (still not encrypted) SNI

Man it's nice to live in the country not prioritizing internet censorship

On which grounds would you punish some companies which are using a fully legal platform? If you had beef with the ad contents, you'd punish them already for that. But if you have beef with the platform algorithms, punish them for exactly that. Not over proxies! As long the algorithm was designed for creating dependence, than regulate that - exactly like you (should) regulate other substances creating dependence. And some countries are going exactly this way: not only Australia but also Finland, Spain...

Ok, imagine a law punishing a platform comes out. How will it be enforced? You can fine the companies but they can just close presence in europe. YouTube will continue to work even if all the YouTube's servers in europe are gone.

Or should the only outcome of the law be that the police could confiscate phones from kids? punish parents for allowing social media? Laws are not useless, at least teachers and parents will have a clear call to action. But still