Stars with higher mass have shorter lifespans. When the sun becomes a red giant, its atmosphere will engulf the Earth. During the red giant phase, a main sequence star's core collapses and burns helium into carbon. After about 100 million years, the helium runs out, and the star turns into a red supergiant.
I hope this finds you what you were looking for.