Counting calories was the biggest thing, I like Cronometer. I did a crash diet to reset what my body expected out of portion sizes but quickly scaled back up to healthier amounts (no point getting an eating disorder over this). Don't obsess over tracking things exactly it's all flawed anyway. Instead just be consistent so trends over time can be identified and adjusted. I didn't do this for weightloss but I also quit drinking around that time which helped too. Started going bouldering regularly, recently bought a bike, and I don't own a car so I tend to do a lot of walking.
Recently something shifted where I'm no longer counting calories to make sure I'm eating small enough portions, I'm counting calories to make sure I'm eating enough. I never changed what foods I eat I just changed the portions.
Oh and if I'm feeling really hungry but don't have a lot of calories for the day I'll microwave a potato for a bit then pop it in an air fryer to finish. Baked potato quality in under 10 minutes, if you don't load it with dairy then they are less than a calorie a gram making them pretty diet friendly.