Life cycles and Supernovae

Stars are born when clouds of gas and dust contract under their own gravity. Once enough mass has accumulated, the pressure and temperature increase so much that nuclear fusion reactions start. Hydrogen usually fuses into helium over several intermediate steps. The temperature required for this is around 10 million Kelvin.
As long as the nuclear fusion pressure from inside and the gravity from outside are in balance, a star is stable.
If the fuel supply inside a star runs out, gravity from outside gradually takes over and the star begins to die.

This means that the birth mass determines the attainable age of a star. The way a star dies also depends on the size of the star:

Protostars

Protostars (literally translated precursor of a star, from the Greek protos = the first) are young stars that are currently in the process of being formed. They are also called brown dwarfs and are not yet hot enough for nuclear fusion. Further gravitational mass increase would be required. In this case, they would continue to contract until the temperature inside them exceeds 3 million Kelvin and hydrogen burning begins. A young (light) star would be born.
If there is no further increase in mass, energy production stops and the star cools down.

Birth mass: Light stars

Light stars with 0.8 to 8 times the mass of our sun, lasting several billion years. During this time, the star produces energy by converting hydrogen into helium. When the hydrogen supply is used up, the star inflates and turns into a Red Giant, examples include the stars Aldebaran or Betelgeuse.
Red Giants expand, become significantly cooler and their color becomes yellowish to red.
A few million years later, the outer shell disperses into space into a Planetary Nebula.
What remains is a core that has been compressed by gravity to about the size of the Earth - a Withe Dwarf.

Birth mass: Medium weight stars

Medium weight stars have 8 to 20 times the mass of the Sun. Their evolution is much faster than that of light stars - their stable phase lasts barely a billion years before they run out of nuclear fuel. Then they transform into supergiants of enormous luminosity. The demise of these giants is triggered by a destructive "supernova explosion" that blows away the star's outer shell. What remains is an unimaginably dense core – a “Neutron Star”

Birth mass: Heaviest stars

The heaviest stars are more than 20 times larger than our Sun. Within a few million years, they use up their entire fuel supply through nuclear fusion before quickly expanding into gigantic Blue Giants, which just as quickly collapse again as a result of a supernova explosion. Their life cycle ends with the formation of a Black Hole

Planetary Nebulae

A Planetary Nebula consists of a shell of gas and plasma ejected by an old star at the end of its evolution. The lifespan of Planetary Nebulae is usually no longer than a few tens of thousands of years. This is short compared to the lifetime of a star, which can last many millions to several billion years. A total of around 1,500 examples are known in Earth's interstellar orbit, the Milky Way system. The name is historically determined and misleading, as these nebulae have nothing to do with planets. The name comes from the fact that they usually appear spherical in a telescope and resemble distant gas planets.

Link to Wikipedia: Brown Dwarf
Link to Wikipedia: Planetary Nebula
Link to Wikipedia: White dwarf
Link to Wikipedia: List of largest stars
Link to Wikipedia: Neutro star
Link to Wikipedia: Blue giant
Link to Wikipedia: Black hole
Link to Wikipedia: Supernova
Link to Wikipedia: Supernova remnant