The UK now has a sugar tax on soft drinks that seems to be having a measurable positive effect. Whether it is a meaningful effect remains to be seen though:
"The findings suggest that a year after the sugar tax was introduced, adults reduced their daily free sugar intake by about 10.9g, and a reduction in soft drinks accounted for over half of this reduction. This translates to a reduction of around 40 calories daily, which if maintained, and assuming no other changes, could lead to 1.5kg weight loss over a year."
https://theconversation.com/how-do-we-know-the-uks-sugar-tax...
So perhaps instead of exhorting people to do better the state should continue to try to make bad habits more expensive and good habits cheaper.