Why massive stars die young
A star's main sequence lifetime is the time it spends fusing hydrogen into helium in its core. Counterintuitively, the more massive a star is, the shorter this phase lasts. A massive star has more fuel, but its core is far hotter and denser, so it burns through that fuel at an enormously faster rate.
Luminosity rises steeply with mass, roughly as mass to the third or fourth power, while the available fuel rises only in proportion to mass. The lifetime therefore falls sharply: a ten solar mass star lives only tens of millions of years, while the Sun will spend about ten billion years on the main sequence.
The enormous range of lifetimes
The spread is dramatic. Hot, luminous O and B stars exhaust their hydrogen in a few million to tens of millions of years and end in supernovae. Sun-like G stars last billions of years. The smallest red dwarfs, the M-type stars, are so cool and frugal that their main sequence lifetimes can exceed a trillion years, far longer than the current age of the universe.
This means every red dwarf ever born is still on its main sequence today, and none has yet had time to die of old age.