The interesting thing is that you followed a calorie-controlled diet earlier this year and lost a considerable amount of weight. This suggests you’ve got a fairly good idea of how much to eat in order to produce that sort of result.
So what could be different this time around? The only explanation that makes sense to me is that you are now more insulin resistant, perhaps (at least in part, and maybe a large part) due to the dieting earlier this year.
Most of us become more insulin resistant as we get older, which is why it becomes easier to gain and more difficult to lose as we age. Dieting can certainly accelerate this; and is one reason why “dieting makes you fat”, as is so often said. Loss of lean mass would be the main contribution with this.
My own view on what to do about this is to eat food with a high nutrient density, low carb and high (good) fat. That’s what I do, and you can look into that or not. It’s entirely your choice, both to give it a try, and to continue (imperfectly, of course) if you find it of benefit.