If you want to loose weight you should focus on your diet.
Diet -> loose weight
Gym/Exercise -> build muscle / retain muscle mass
And most importantly don’t try to rush it. I.e. if your daily calorie expenditure is 2000k, don’t drastically reduce it to 1200k. It’ll fuck up your metabolism, insulin resistance, etc. Instead, start slow. Say 1800k. And then gradually update those every 4-6 week.
Realize that it’s a journey and it’ll take time.