How do people become overweight?
Mostly by moving little and eating whatever comes their way from morning to night. Islam teaches instead that good things should be enjoyed in moderation.
The answer is actually very simple. Anyone who does little work and hardly moves, but eats whatever comes their way from morning to night, will put on weight. The body stores what it does not use.
So the key lies in moderation. Islam does not forbid eating well. The first verse above explicitly says that we should eat and drink. But it adds that we must not exceed the bounds, because God does not love those who go too far.
The hadith above makes this very practical. The stomach should not be filled to the brim. One part for food, one part for drink, and one part left free so that one can breathe easily. Whoever eats this way gets up from the table before feeling heavy.
Using the body is part of this too. Work, walking and movement in daily life keep it healthy. The body is a gift from God, and taking care of it is a form of gratitude. Eating in moderation is therefore not only a matter of health but also a matter of character.