Nicotine is probably the worst example possible to argue that laws prevent children from using and becoming addicted to something.
Why is it the worst example? Sure, the laws don't 100% prevent children from smoking, but certainly they have an effect. I'm not using it as an example of a perfectly effective law, I'm using it to make the point that it wouldn't be reasonable to say "parenting is the only defense against smoking" and scrap the law.
There's also heroine and fentanyl, both are regulated by the law.