I lost quite a lot of weight about 4 years ago and have kept it off.
I used to eat more highly-palatable, low-nutrient, high-calorie, foods which did not keep me satiated for long. Not fast food every meal, but a bit much dessert, larger portions, and usually meat with lunch and dinner, so I was taking in more kilojoules per day than I needed.
I've been learning daily about nutrition, kilojoule intake and expenditure, and much more, and have noticed that over time, the body transitioned to stop wanting those sorts of food.
I learned what foods were worth using those amounts of calories for.
Sometimes, cake is worth it. But mostly, it's just "empty calories" that don't fill your stomach up and you want more.
Sometimes, steak is a nice treat and a good source of nutrients you might need. But for many, it's a cut of red meat that you have used weekly when mince would be more egalitarian.
I learned to bulk up my plate with more veggies, which, as well as having essential nutrients, contain fibre to keep you full, keep your digestive tract in good condition, and create volume to increase satiation even more. And frozen veg can be cheap and just as good and more "fresh" than "fresh".
Online, and when dieting, some people act as if "healthy" means to punish yourself.
They can avoid "healthy" food altogether.
Or they can go on a "healthy" diet of kale and half a steamed chicken breast a day.
Then they both wonder why they don't like dieting.
When I was bigger, I used to wake up thinking, I'm going to try and lose weight today. Miss breakfast, tiny lunch, be starving by dinner and want all the tasty foods, alcohol, and dessert.
Wake up, feel crap, repeat.
I lost the weight during 2015-2016 by cutting back on overall energy intake, but not changing what I felt like having, including alcohol.
The alcohol use stopped in Feb 2018 when I wanted to try a new challenge, Feb Fast, and I found it was wonderful being able to eat those calories instead and feel super-good all day.
People want one quick solution, one quick diet trick.
Bodies and diets are all different and personal, and change over time. We all have to choose what we work on.
Keeping the weight off is just the same. Some days you eat more, some days less. Keeping an eye on overall weekly intake and/or the scale keeps you from having to make radical changes for a long time. Holidays and regular “diet breaks” are now recommended by leading dieticians and nutrition scientists, due to the need to maintain an optimal metabolism and mindset.