(I wrote this as a comment reply, but decided it should be its own post)
History so far:
Pre-20th century: Most people ate a diet low in carbs and high in animal fats. Heart disease and diabetes are almost non-existent.
Early 20th century: Seed oil is marketed as replacement for animal fat. Crisco and margarine are king.
Mid 20th century: Heart disease has become a thing. A sensible person would say, "shit, must be these vegetable oils!" Nope. American Heart Association declares that animal fats are the problem. Seed oils become even more popular.
Late 20th century: Heart disease has accelerated. In 1977 the United States Government declares that fats are the problem (hey, at least they are half right which is better than the government usually does). Low fat/high carb is recommended.
Later 20th century: Starting in 1980 the obesity and diabetes rates are a hockey stick (and you don't even have to merge to completely different data sets to get it). A sensible person would say, "shit, it must be the low fat/high carb!" Nope. In 1992 the food pyramid is released and it recommends low fat/high carb.
Early 21st century: Obesity and diabetes continue to soar! Obesity is the new bitcoin! To the moon! 2005 revised pyramid. low fat/high carb. 2011 Pyramid is trashed for circle. Low fat/high carb. Changing the shape of the recommendation didn't help strangely enough.
Future: Who knows what horror this Beyond Food and bug burger future holds for us. Just like the early 20th century push for seed oil was a successful attempt to sell agricultural bioproducts as food so is the 21st century push for plant protein. The pea protein in Beyond burgers is a byproduct of glass noodle production in China.
My point is NEVER EVER EVER trust "the experts" on nutrition because they will always be in favor of whatever is profitable (and make your own mayonnaise).
It isn't just diet. People flat out used to walk more. They didn't necessarily ride everywhere. Of course, shops were generally closer than they tend to be now (thanks to cars), but they wouldn't think of getting on a horse just to go from one end of a one-street town to the other.
They also did more physical labour, in all kinds of contexts. Pretty much everything was inherently more labour-intensive than they are now, in the age of electricity, and natural gas. We don't even need to chop wood to cook or keep warm all winter, except perhaps as supplemental heat.
This is the other side of the coin as to why fatness used to denote the tribal chieftain in certain cultures. It wasn't just that they got all the food - they also didn't have to lift a single finger to do anything.
While physical activity is important I think it is only a tiny piece of the puzzle compared to diet. Humans don't need all that much physical activity to stay healthy. A laborer may burn 4000 calories per day and a professor may burn 2000 but if they are both insulin resistant with a carb heavy diet they will both likely be too hungry and overconsume calories. If they are insulin sensitive with an animal fat heavy diet then they will both likely be satiated and not overconsume calories. It's just the laborer will naturally eat twice as much to fit their need.