The best answer is “whatever works for you”.
I always do my strength training first, because that is my priority and I want to have as much energy as possible to hit the weights hard. This also gets my heart rate up (I walk laps between sets), and then the cardio session at the end of my session keeps the heart rate up.
I warm up, then lift, then do cardio, then stretch.
Don’t stint on the weights if you want to lose fat. Building muscle raises your metabolic rate so you burn more calories between workouts. It also changes the shape of your body, so even if your weight doesn’t change you will look, feel, and perform better.