Here's a link with lots of tips, like staying hydrated.
https://authoritynutrition.com/3-step-plan-to-stop-sugar-cravings/
I don't usually crave sweets, but when I do... I'll give in to a tiny portion of my temptation, then immediately put 5-10 grains of salt on my tongue. It stops me from wanting more. 🍯🍪🍫🍰