If cardio fitness isn’t your main target then push weights first and do cardio after, or do them at separate times of day.
Whether you are on a weight loss plan or a muscle gain plan your muscles will benefit most from prioritising weights first - and you’ll burn a heap more calories. The way to go is to hit weight training fresh so that you have maximum strength to push muscles as hard as possible and aren’t fatigued from any prior exercise (like cardio). This will also reduce the chance of an injury occuring which could happen if you are too exhausted from cardio to maintain correct form.
Weight training burns major calories and will deplete muscle glycogen stores fast. By the time you hit cardio you’ll be more likely tapping into body fat for energy from the start.