There are generally a few answers to this. But they all boil down to:
* You never used to be fat.
Once you become fat, your body's homeostatic set point is permanently altered. Your body never destroys adipocytes — it only shrinks them. If you stay within some range of your current homeostatic set point, your body will either increase the size of your adipocytes, or decrease their size, depending on whether you're over- or under-consuming. But, after a certain amount of overconsumption, your body will actually create new adipocytes... And once you have them, you can never get rid of them, minus expensive and dangerous surgery.
The best you can do is shrink them. But, keeping the adipocytes shrunken takes significant willpower. So basically, once you get fat, you're going to have a hard time.
Pretty much the only alternative is somehow tricking your brain/gut into not getting hungry when it "should." Ozempic, etc seem to somehow allow you to not feel as hungry even when your adipocytes shrink, or at least alter your perceived set point to be more-shrunken. Bariatric surgery is similar although much more dangerous. (Liposuction actually removes adipocytes, but it's quite dangerous — and it doesn't remove visceral fat cells, which are the worst kind of fat from a health perspective.)
Now, there's a separate question of "why do some people get fat initially?" And that can result from poor childhood nutrition, or genes (e.g. Samoans), or exposure to certain chemical compounds (e.g. certain psychiatric medications), or natural aging (recent research indicates middle-aged mice, and probably thus middle-aged humans, have their stem cells trigger more adipocyte production), or just lifestyle. But it's the initial weight gain that ends up trapping people into the higher homeostatic set point, which is very difficult to recover from, even with dieting and exercise, since you will need to keep yourself basically constantly hungry either by eating less or by exercising much more even after you "lost" the weight — because while you lost weight on the scale, you didn't lose adipocytes, and adipocytes do not want to be kept empty.
So why can I do that, but others can’t? It would be comforting to just say that I’m better. It would also be a lie.