Lifting weights causes tears in the muscle that require energy to repair, so weightlifting is a good way to burn energy. Not only that, but the more muscle you have, the higher your basal metabolism. That said though, it's all about the diet.  Also, starvation mode is a real thing: https://en.wikipedia.org/wiki/Starvation_response