There is a some good advice above. There is no magic answer that suits all people, and you'll need to adapt some of the above to your own personality and circumstances.
All my life I'd been mid-to-higher normal range BMI with what I consider little or no effort. At start of lockdown, almost 2 years ago, I had an accident that totally upset what I "normally" did and I put on 1.5 stone, which I've lost now.
I had a commute that involved a 20 min walk, I walked every lunchtime for 20 mins to clear my head. Even though we have food at work (work in tech area) and I'd typically just pick up some snack and fruit for lunch. I did some running twice a week and played badminton twice a week. I was very active, but a knee injury has stopped all that now.
It's amazing how quickly the weight piled on. It was also clear to me that while I ate mostly healthy food I was snacking way too much, and drinking too much wine as well. With no sports activity, WFH, no walks, all those calories went elsewhere :(
It took me 6 months to lose a stone, and another 6 months to lose 1/2 stone. I've learned through that I just had to totally stop snacking, plus cut down on drink. I won't be able to run again or play badminton, but I force myself to walk every day for 5k. It's boring as hell, I don't like walking alone in the night (long time ago incident), but I try get DH to go if he is home, or just walk near where we live.
I'm in a routine now for the last year, and I'm happy with it. I'm somewhat aware of my weight since my DSis put on a lot of weight in middle age, as did my mum.