Create a Calorie Deficit
To halt weight gain you balance energy input and output. If you are gaining weight you are eating more food than you require. Your body converts the excess energy into fat to store for later. Humans are no longer hunter and gatherers so we don't experience long famines - there is no reason to build up fat reserves and plenty of health reasons why too much fat is harmful.
