If it were as simple as calories in/calories out then explain why as a child in the 80s and a very active child at that, I was overweight at 6 years old?
My sister, 18 months younger, was basically a stick insect, my nickname was 'Chunky'...
Same diet - three meals a day, snacks occasionally but we're talking a mini mars bar at the top of Snowdon, a chunk of Kendal Mint Cake on Helvelyn, a mini Snickers down a cave... not the endless snacking kids do today.
The rest of the time it was home made normal food, normal portions though there was the obsession with clearing your plate and a lot of food stress over things I would not eat (meat, fish, things with a very distinctive texture).
We were very active, walked a lot in the week, even more at weekends, parents members of various caving/climbing/walking clubs - canoeing, swimming, caving, hillwalking, rock climbing, horse riding, skiing... We were joining in on those activities as soon as we could, I was down my first cave at 2, skiing at 4.
Despite endless diets, increasing the exercise, and absolutely not sneaking food as there was no food to sneak, I continued to gain weight, and my sister did not.