What defines the main-sequence lifespan of intrinsically hot and massive B-type stars compared to K-type stars?

Answer

Measured in the tens of millions of years

B-type stars are specifically mentioned as being intrinsically massive and possessing very high surface temperatures, often ranging between 10,000 and 30,000 Kelvin. Because of this high mass, they are burning their hydrogen fuel at a furious and accelerated pace, consistent with the general principle that greater mass leads to shorter life. Even though they might not be the absolute most massive stars, their energetic consumption ensures their main-sequence lifetimes are counted in the tens of millions of years. This contrasts sharply with cooler, lower-mass stars like K-type or M-type stars, which are far more fuel-efficient and can sustain fusion for hundreds of billions or even trillions of years.

What defines the main-sequence lifespan of intrinsically hot and massive B-type stars compared to K-type stars?
astronomylifespanstarmain-sequencestage