Pick one. Lose weight slowly, keep muscle. Lose weight fast, lose muscle. That’s pretty much how it works.
Start by cleaning up your diet: no soft drinks, no fast food, no takeaway, no processed stuff. Eat more veggies of all colours. That’ll help a ton.
Next step is to slightly reduce your calories from what you’re eating, maybe by 200 cal/day. When that stops working (10 days no weight loss), drop another 200 cal/day, etc. Once you get to the point where your abs start poking out, any further drops would be 100 cal/day and start adding extra cardio (something like 30 minutes low intensity). At this point also make sure you never go under bodyweight in pounds x 11 per day in calories.
This is a great article for macros and the like