There was a fascinating talk about this by a psychology professor at Stanford, who I heard speak last weekend. He gave a TED talk about it that got 13 million views.
He said most people know but try to use self-discipline to resist. It’s exhausting and ineffective.
Curiosity is the far more effective thing. Curiosity about sugar, its health effects, how much is added, what it does to cognition, energy levels, etc. The more curious you become, the more you know, the less likely you are to indulge.