* Low-mass stars (like our Sun): After the main sequence, they become red giants. They expand significantly, cool down, and fuse helium in their cores. This is followed by a planetary nebula phase where the outer layers are shed, leaving behind a white dwarf, a dense, hot core that slowly cools.
* Intermediate-mass stars: These stars follow a similar path to low-mass stars, becoming red giants and then white dwarfs, but they go through a horizontal branch phase where they fuse helium in a shell around their core.
* High-mass stars: These stars become supergiants, fusing heavier elements in their cores. They eventually explode as supernovae, leaving behind either a neutron star (a dense core of neutrons) or a black hole (a region of spacetime where gravity is so strong that nothing, not even light, can escape).
In short: There's no single answer to what follows a main sequence star. It depends on the star's mass and the specific nuclear fusion processes that take place within its core.