One is easy to pin on a particular category of non-essential products (The world won't stop if non-smokers don't pick up vaping), the other (air pollution) is a communal externality of nearly every single productive activity that our society engages in (Because those activities involve either electricity or transportation, or both.)
Are you saying sugary foods and drinks are essential products?
While the excessive amount of sugar in some food and drinks is bad, at least they don’t give you withdrawal when you stop taking them.