What worked best for me was fitting eating around my weekly routine.
I have a standard 5 days work, 2 days weekend.
In general, the weekend is for fun so I applied that to food as well.
The week is for healthy eating. No snacks, bed early to be well rested. The weekend is for blowing off steam and eating treat foods.
For me, this meant that I reduced my cravings as I wasn't eating unhealthily all week. By the time the weekend rolls around now I don't want that unhealthy food that much. Note. It's taken a while to get to this point but my weight has now been consistently low for over 2 years.
I think the main thing is whatever you find that works for you, it has to become something you can sustain.