The only thing I know that works is actually eating less.
Not for everyone, no.
"Resistant obese" people have been known since the 1960s in nutrition science: they are people who won't lose weight even when locked in a metabolic ward (=unable to cheat) and limited to just 600 calories a day of food. Read one such study here for example (see page 742: no weight loss on hospital-controlled, drastically restricted-calorie diet). Your advice will NOT work for these people.
I wonder how one can gain weight by putting less calories in their system.
Yeah, the scientists involved in these studies like to call the resistant obese people "walking thermodynamic paradoxes" because they can only wonder, too. And calling them that won't help them in any way, nor will it help science understand why. You have to change paradigm to do that.