I think smoking is a little different for a few reasons.
It's physically addictive with harsh withdrawal symptoms that makes it difficult to quit; and it has significant healthcare costs for the wider community when smokers eventually get sick and die prematurely.
Nobody is going to get addicted and die prematurely from reading 4chan. Cleaning what you consider a cesspool is not the job of the government. These laws are about kids stumbling into the cesspool before they are ready.
Parents can choose to just not give their kids phones till they are 12 or 13 (highschool). Before that, internet access is on locked down devices in the family room with somebody else around.
Personally I think once your kids are about 13-14 you have probably had your chance to pass on your morals, they need to be mentally prepared to encounter bad stuff on the internet and deal with it.