Is it legal where you are to smoke in the park? As long as it's open air and you're not blowing smoke in anyone's direction or disturbing them, I don't see the issue. It's none of their business what you do with your own body, but unfortunately many people like to get on their high horse and pretend that they have never made risky/unhealthy decisions before, as if health decisions like smoking, drinking, or eating junk foods equate to morality.
I know a couple of people like this and the logic is grating, especially as it often comes off as very hypocritical if you know them personally and see the "dumb decisions" they make too. For example, I know several people who are vegan and talk about omnivores being unhealthy or wasting money on meat, when they spend the same amount of money on meat substitutes and don't often eat balanced meals either. I also know someone like the woman you encountered, who talks down to me frequently for drinking in moderation socially, when this person developed a health problem that was correlated with their diet, but won't stop or cut down on eating deep fried food.
So everyone has their own vices. It's really none of their concern what yours are, as I guarantee that woman also has a bad habit or two of her own and is not one to talk. Anyone who smokes, drinks, or does substances typically knows what the risks are and doesn't need a PSA from "concerned citizens" who probably don't even actually care. The fact that she finds it pertinent to flex on you and call you an idiot shows that it likely isn't out of goodwill.
We have bodily autonomy for a reason, but a lot of people can't fathom why anyone would be drawn towards substances and have to project their own feelings of superiority about the matter. Don't let it bother you, at the end of the day, it's not her choice to make whether you smoke or not. Many people engage in risky behaviours everyday knowing the consequences, and shame (especially from a random stranger) isn't going to suddenly stop that.