You can do both. I used to have a lightning start in any mountain bike races.
Which mean I was always first for a few laps but then my poor endurance (weakness) made me lose at the end, finishing 3rd and most of the time 4th.
I then worked on improving my endurance.
When I equipped my MB for the road (no suspension, slick tires, bigger chain ring), I could ride full speed for 15 minutes and I could ride non stop from full speed to 95% speed for 45 minutes.
After being sick I went back to zero and I've been working on rebuilding my skills which took a long time but now I'm older so I have to work harder at it. I can go up steep hills easily but my top speed/endurance are not great right now so my goal is to get back to where I was (I hope).