New routines - looking for advice

Hello everyone,
I’ve just learned that to lose weight and build muscle I should be doing weight training BEFORE cardio. This is a new routine for me and I’m wondering what types of goals I should set for myself. Today I did a mixture of squats and reverse lunges with and without weights. After that I hit the treadmill and wasn’t able to run as my legs felt too sore. But I feel as if I’m doing less of of workout.
A few weeks ago I would have started on the treadmill and run two miles and then done the weight training afterwards, doing it in that order seemed much easier and I feel as if I’m doing less... how do I know what to do?!?