Depending on who you talk to and what your goals are, the workouts that you complete can be anywhere from 30 minutes to a couple hours, but where should you be in terms of length and what amount is too much?
When you start working out, one of the main things to consider is your goals and what you are trying to achieve. If you are wanting to be able to increase how long you can run, working on longer runs and building your stamina may be something to focus on. If you are training for strength and wanting to get stronger, you will need longer rest times in between your sets so that you can perform optimally and make sure that you are utilizing as much strength as you can.
So, short answer is it all depends on what your goals are and also your activity level coming into working out.
What I mean by that is lets say that you just joined a gym for the first time ever, doing a 2 hour workout may be too much for you right off the bat, so looking to more 30-45 minutes would be better for you starting out! Spend the first 5 minutes warming up, utilize some stations of weight training, have a cardio piece at the end, and then leave enough time to stretch and cool down to finish off the workout.
Now, for strength athletes and bodybuilders, these numbers can vary. There is also the misconception that more is better in terms of exercises and workout time, which is not always the case at all! There is such a thing as too much in terms of lifting weights and doing cardio. For more reference, please refer to Jeff Nippard and the podcast that he did on MRV and MEV, which are just fancy terms to talk about maximum volume on a lift and minimal volume needed to see results. Volume in this case being the amount of sets and reps that you are doing of an exercise.
Now for running, it is good to understand that you need to work into more mileage and add some variety, but that is for another post. Starting off at doing 5 miles may not be effective starting out, so work from 1-2 and then move up from there as you get faster. Utilizing an hour long workout with maybe 25-50% of the workout being actual running and then the rest of it working on interval training with weights and some cardio will not only allow for a shorter time, but in the long run it will boost your overall effectiveness when you run and boosts your stamina!
Before you go and do any of this, talk with your doctor or a fitness professional more about where you should be in terms of length and what you should work on starting out! Be weary of "fitness gurus" on the internet and social media as they are not always trustworthy! Do your research and be carful when starting a fitness regimine!