The simplest version of this, which I did myself, is just to have less food in the house. Stop buying snacks, only get items you have a planned meal for, and you spend a lot less willpower resisting the temptation to grab stuff while you're already in the kitchen or etc.
It's harder to modify what restaurants and online orders are available to you, but maybe you can work up to blocking or uninstalling those apps or something?
A big thing that helped me was just to start cooking/preparing most of my meals myself. Restaurant portions are usually too big and they load up the food with sugar and sodium to make you eat more of it and still want dessert.
It's easy to learn how to make an interesting variety of simple dishes with a relatively small number of staple ingredients. It doesn't end up taking more time than going out or waiting on DoorDash.