Yeah, its hard. I myself have been on the weight rollercoaster for my whole life. I have found that I need to keep a log my workouts, nutrition, and weight. If I do that, the weight stays off. If I take a break from logging, my weight creeps up.
In March 2020, I was about 202. Then the COVID lock down happened and I didn't leave my house for a few months and stopped logging. I stepped on the scale in July and I was up to 223. It took me about 5 months of being religious about logging everything to get my weight down below 200. I have managed to keep it down since then and I have decided that continually logging nutrition is something I just need to do as I get older.
My advice is to log 7 days a week, stick to your calorie goal 5-6 days a week, but have 1-2 "cheater" days per week when you eat whatever you want. And do some kind of a workout every day, even if that workout is just going for a 2-3 mile walk. Sometimes I beat myself up for missing a workout but I find just getting something in is better than nothing.