Banning smoking in pubs & restaurants was hysterical, unnecessary, illiberal, myth-based, costly, and damaging (as the malaise of the pub trade shows).
It was supported by a bunch of curtain-twitching busybodies more concerned with imposing their personal taste on places they didn't frequent in the first place - middle class women in particular - and it legitimised moral panic as a basis for making public policy.
So yes, I'd say this comparison is apt.
The law should not be a gesture. We should not make law on the basis that, though the problem is lacking evidence and the solution is proven not to work, it will nonetheless "change the culture".
You try to change the culture by making arguments, not by sucking up to politicians and having them dictate terms to your fellow citizens.
You live the culture you want by using the tools you already have at your disposal (such as banning smartphones, monitoring your child's internet usage, etc).
You provide the evidence that your views produce better results.
You do not force every adult in the country to hand over their data, their ID, their right to privacy, on the basis of mere vibes.
You may not like the choices other people make, but you do not have the right to impose your whims on them.
This is foundational liberalism, and it is pathetic that it must be restated in this way.
Banning social media for kids is necessary to change the culture around it.
Like how we banned smoking in restaurants. It changed our views and habits on smoking.
Culture is everything.
It is how we save our kids.