I started out by cutting back (I would allow myself one item with 10 grams of sugar or less - a Yasso bar or a single serve container of rice pudding or something) and then cut back to maybe something with less than 5 grams. Early on, complete deprivation made me miserable and I would have given up.
I lost 45 pounds and have kept it off for more than a year mostly be cutting sugar. These days, I'll have a few sweet things a day, but my total added sugar intake stays at 15 grams or so (so I'll have a yogurt with 4 or 5 grams, a La Colombe canned latte with 4 grams, a square of dark chocolate with 2 grams, a mini Kind bar with 2 grams, a dollop of whipped cream on a double espresso). I eat a decent amount (about 2000 calories at 115 pounds) and these small treats easily fit into my overall diet. I probably used to have 200 grams of added sugar a day.
I'll order dessert at a restaurant, I get a small pack of peanut butter M&Ms if I go to the movies, I'll certainly eat cake on a birthday, etc., but overall I don't indulge more than maybe 2 or 3 times per month.