Although it is true that the larger the star is, the longer it lives, it is also true that a high mass star will die sooner because it burns through hydrogen more quickly. The faster the fuel in a star is consumed, the shorter its lifespan will be.
The lifespan of a star depends on how much fuel it has and how quickly, or slowly, it burns its fuel, which is known as its luminosity.
The sun, the largest star in the solar system, formed around 4.6 billion years ago. It turns 600 million tons of hydrogen into helium every second, and because its hydrogen supply is not unlimited, scientists believe the sun will run out of fuel in around 7 billion years.