The food and drink you consume gets processed into glucose. Glucose is the primary energy source your body uses. When your glucose runs out, your body shifts its energy source to mostly fat and some muscle. When the fat runs out, your body shifts its focus entirely on muscle, and at some point, you die.
This means that when you have a glucose deficit, you lose weight, and when you have a glucose surplus, you gain weight. No diet works unless you consume less and every diet does when you do.
Ergo, to lose weight, you have to consume less.