Depends on the type of fat, I think. From what I have found out myself, it is trans fats > sugars / simple carbohydrates > polyunsaturated fats > complex carbohydrates > monounsaturated fats > saturated fats.
Obesity really exploded when consumption shifted from butter towards margarine and vegetable oils: https://www.researchgate.net/figure/Trends-in-US-fat-consump...
If anything, consumption of monounsaturated and polyunsaturated fats is the issue: https://www.frontiersin.org/journals/nutrition/articles/10.3...
But of course, you also have to consider nature of food. In nature, you would consume either carbohydrates or fats - either plants or meat. But processed foods include a lot of fats and a lot of carbs in a single package. And that is the actual killer. Fats aren't an issue, carbs aren't that much of an issue, isssue is the nature of fats and carbs consumed, and issue is the way we consume them.