Or you could, just take in less calories in the first place by consuming less food.
That doesn't mean you should outright go on to starve yourself, but eat healthier and have less portion and you would also need to exercise less since you would have much less needing to burn in the first place. Yeah, at the start it would probably feel like shit since you'd be hungry all the time due to reduced food than your usual, but you can drag it out by drinking water.
(Technically speaking, you could actually starve yourself for weight loss. However it's extremely ill-advised because doing so will severely weaken your immune system, screw over your hormone regulation, and possibly would result in no loss in the end anyway given your body is very likely to go into famine mode and absorb nutrients you do get on an extremely high ratio, as well as the extreme hunger from such practice may drive the person into consuming way too many '"just this time" snacks' or having big meals at the end of this exercise without knowing resulting in diminished gains while still accompanied by the previous risks listed above.)
It is said that having a good diet is far more impactful than having a good exercise routine when it comes to health management and weight loss. This doesn't say that you shouldn't exercise at all, just that diet plays a far bigger role in between the 2 on this subject afaik.