While true its too reductive and doesnt account for appetite which is by a massive margin the number 1 contributor to obesity, proven by ozempic
I find that the time of the day also matters, too. For example, I try to eat all my meals before 12 PM or so. I find that by doing this, I can eat the same amount of food without gaining weight, as compared to later in the day. Which I think makes sense, the body's need for energy isn't static throughout the day, it has a cycle and it fluctuates.