I'd put myself under what for me personally was an enormous amount of stress doing a degree equivalent vocational qualification taken in a foreign language whilst working shifts and with three school aged children - when I passed my final exams during lockdown one (our exams went ahead as normal but with masks) the stress lifted and I felt ready.
I'd put the weight on through pregnancy and a toddler who didn't sleep and low grade but persistent background worry about being dependent as a trailing spouse in a country where my existing UK qualifications aren't recognised, so generally finishing the qualifications at a time the youngest child no longer woke me at night removed years of stress.
My health worries had been building during the last year of my course but I think it was partly psychosomatic stress reaction exascerbated by my revising for medical related exams and partly peri-menopause! I had become particularly worried about heart disease.
I lost 45 kg/ 7.5 stone through intermittent fasting and cutting right back on processed sugar and simple carbohydrates (not low carbing as I didn't change how I eat complex carbohydrates in whole foods, just processed ones).
Basically its hard to lose weight if you're in a bad place, under stress, chronically tired etc. and easy if you're relaxed, feeling relatively good and have a bit more time to cook properly, take a form of light exercise you enjoy, and are not feeling as though unhealthy foods are your only "treat" or self indulgence.
It's a bit unfair but I find you can only lose weight and keep it off if you are already in a "good place" psychologically. Its the reason fat shaming and "hitting rock bottom" doesn't work with long term weight loss, because people who are overweight usually have a habit of turning to food as a crutch/ comfort/ consolation / to numb stress.