There's a lot of info about this online, but here's a quick TL;DR example:
https://www.health.harvard.edu/diet-and-weight-loss/lessons-...
What most people don't understand is that weight loss and health is about a lot more than 'calories in/calories out', despite what we've been told for decades.