The life and age of stars
The life of a star depends on its mass and size (star sizes start from one-seventh the size of the sun for small stars to 250 solar masses for large stars, according to what has been discovered) and are divided into three types.
Large stars have a short lifespan of one, tens, and hundreds of millions of years. The reason for their short lifespan is the large consumption of fuel inside their core (hydrogen). When the fuel in them is consumed, they explode due to the strong gravity prevailing, forming supernovas or supernovas, forming black holes or neutron stars.
Medium-sized stars are those that are closer to the size of our sun or close to it, and their consumption of hydrogen is less than the large stars, so their lifespan is longer than them. Billions of years remain until they consume fuel and do not explode, but they fade in their light and turn into a red giant star, then its outer layers fall inward due to gravity to form White dwarf star
Small stars, which are stars whose mass is much less than the mass of the sun, consume little fuel, have dim lighting, and continue to live for billions and billions of years, some of which are as old as the universe itself.
Source: websites