High-mass stars have shorter lifespans of 1 million to tens of millions of years compared to low-mass stars like our Sun which live for tens of millions to trillions of years. During their main sequence phase, stars convert about 1/3 of their hydrogen into helium through nuclear fusion. Massive stars are capable of fusing heavier elements like iron. In their later evolution, stars eject their outer layers and collapse their cores, possibly becoming a white dwarf, neutron star, or black hole at the end of their life.