Story of my life. Sweets after dinner are my weakness, My sweet tooth is massive.
At the start of Mounjaro I swapped to Chunky KitKats, as they're portioned and tasty, 167 calories apiece (not small but already portioned helps). One after dinner at first, then it turned into 2, then 3, and some days 4.
The first dose worked really well on me, so a single piece was easy early on, but once the strong effects wore off I needed more, as usual.
In about four months I lost 9kg doing it this way, but I had to count calories carefully, setting aside 350 (!!!) calories for two chunky KitKats and hoping I stopped at 2 rather than having a 3 or 4 day.
Then I stalled. My tdee fell with the weight, and I'm very short, so 350 calories of chocolate is something I can't afford now. That leaves about 800/900 calories for real food? It doesn't add up.
The answer was clear all along, I just refused to look at it: quit completely. Like you said it's a habit, hence the difficulty, and sugar is addictive on top, so you chase the hit. Sugar breeds sugar cravings, it's a loop.
As with addicts, a little and stopping probably won't work. Keep it to a single day a week, ideally not tied to your usual time, say a sweet snack on Saturday lunchtime rather than pudding after a weekday dinner.
The first day is hardest. Low calorie jelly and chocolate whey protein filled the gap for me. After day one it's far easier, and most days I forget I'm 'avoiding sweets'.
I told you my whole story because 'quit cold turkey' sounds horrible and impossible, that's how it struck me a few months back. My thinking was, if I can't have chocolate to finish my day, my daily happy moment, why bother with anything.
It's a habit, though, and once it's gone you won't miss it. Hard, but possible. Cutting down might work better for you than it did for me, but all it did for me was delay the inevitable.
Planning everything and counting calories lets you keep going a little longer, but it's a slippery slope.