That is not accurate for all stars. Our star, for instance, is a yellow dwarf star (Type G Main Sequence). When it runs out of fuel it will briefly swell up as a red giant then collapse into a white dwarf. At no point will it explode because it simply lacks the mass for that type of chain reaction. We have a billion years before this happens, so can literally fly existing rockets elsewhere if need be. A billion years is a long time.
A 5 second Google search will present you that information in wiki.
The reason I am not impressed by your education is that after you spewed all of that you still can’t connect the dots.
When our sun dies we have no more energy. Earth turns into a brick of ice. Nothing will survive that.
Second of all when our sun “swells” it’s going to swallow up earth. If some how it doesn’t do that it will at the very least increase temperatures on earth to the point where nothing survives.
Humans are fucked no matter how you slice and dice it.
It seems you just want to argue for the sake of arguing. Unfortunately for you there is absolutely no world where you are correct.