The other two have corrected you on the lifespan of red dwars.
However, it’s actually pretty neat to understand why small stars have exceptionally long lifespans, and big ones are very short: it’s because of the limitations of quantum tunneling and nuclear fusion, vs mass.
In order for a star to generate any light, it needs a shit ton of energy. The only way to get this epic shit ton of energy is nuclear fusion. Because of physics, massive particles are attracted to eachother because of gravity. Heavier masses attract more particles. As the particles start piling up on top of eachother, they generate heat because they are also being repelled by other forces (namely electromagnetism). Heat is really a particles kinetic energy - the amount of energy of its movement.
At a certain point, hydrogen fuses to Helium, helium fuses, then heavier elements like carbon, oxygen and nitrogen, all the way up to Iron.
Each time a specific fuel runs out, there is a small to large explosion as the force compressing the particles is less than the force repelling the particles. Depending on how massive the star is, this could happen very quickly, or not at all. Red dwarfs don’t usually have the mass required to fuse more helium, so the fusion reaction continues forever until the gravitational forces are in equilibrium with the e&m forces. In bigger stars, the rate of fuel being consumed increases with mass, so you burn through each fuel quicker. In a star hypothetically large enough, it’s possible that the mass is enormous enough for it to consume all of its fuel in short succession, and instead of even getting a black hole, the star completely blows itself apart.
Which leads to other really crazy things - like the question on supermassive black holes in the center of galaxies. How did they form if stars of a certain size would blow themselves to smitherings?
AmosBurton_ThatGuy@lemmy.ca 2 hours ago
To add onto the comments that you’ve already received, red dwarfs of approximately 0.8 - 0.25 solar masses are thought to be fully convective. So they mix all of their hydrogen fuel down into the core throughout their lives. More massive stars have different layers, the sun has a radiative zone above its core that is so dense it can take hundreds of thousands of years for a photon to get from the core to being released as light. More massive stars are too dense to mix all the hydrogen down into their cores and so end their lives with a lot of unspent hydrogen that gets ejected during the end of the stars life instead of being used as fuel in the core.
Another fun fact is that it’s thought that stars more massive than our sun have an exterior radiative layer rather than a convectional outer layer and so they wouldn’t have the “granules” that we see on the surface of the sun. They would instead be one “solid” shining surface.
God I love space. So fascinating.