My own experience, which successfully corrected an uncharacteristic weight gain about 25 years ago, didn’t involve calorie counting at all.
Instead it involved what used to be known as ‘food combining’, and it suited me down to the ground, as no aspect of it was a hardship.
You know all the Keto and Atkins type diets? Focussing on a low glycaemic index? They all spring from a French regimen from yonks ago, called the Montignac Diet. (I read about it in Vogue, some time in the early ‘90s)
Anyway, it’s a very gentle, forgiving version of a much stricter Atkins-ish diet, whereby you avoid white carbs above all else (and actual sugar, being exactly the same thing as far as bodily fuel is concerned).
Needless to say, as a French diet, dark chocolate is permitted, in great moderation. Au revoir, croissants though, for the time being.
Then the only fine tuning you do is to eat your remaining carbs (eg good wholemeal bread, mostly, but also legumes and lentils, brown rice) with minimal fat (so eat your toast with delicious jam, no butter), and eat your protein (meat abd fish, obvs, also dairy) with minimal carbs, but loads of veg, especially green. Lots of good fats eg olive oil, and, curiously, goose fat (yippee!) which behaves like a healthful plant oil for some reason. Virgin (non-industrially pressed) nut oils too, walnut and hazelnut in particular. (Making mayo with a variety of oils is great fun)
One of the best and simplest recipes is a flourless cheese soufflé: still the best soufflé I ever cook, and it’s foolproof. It’s a really joyful way to way to eat (though tricky for vegetarians unless you are tofu adepts)
The great thing is there’s no substitute food stuffs, nothing ersatz, and you eat absolutely normal ‘mainstream’ stuff, just slightly tweaked in terms of combinations.
Any restaurant accommodates it easily. (Burger sans bun, steak without chips but with a pile of haricots verts, etc)
The big news is that once you are steadily dropping pounds abd approaching you goal (and it does this fast, once you are in the groove of the regimen), you can relax a few ‘rules’ according to your own judgment, knowing that returning to the stricter path will swiftly correct any unwanted gains, but honestly, if you adhere in a general fashion to this ‘diet’, you will never put that weight on again.
I never have, and at 70 Im the same shape and presumably weight I was a good thirty years ago, without any excess, and happy in my skin.
(The basic Montignac ‘training’ one absorbed decades ago definitely helped avoid post-menopausal weight gain)
Montignac was a wonderful experience, as there was no hardship, no real sacrifice (unless potatoes are very dear to you) and no hunger ever, above all.
Calories were neither here nor there.