Hi,
Astronomers have developed ideas about how stars change over time by studying large numbers of stars and using physics to model how they develop. There are still parts of the process that people are working to understand, but scientists think they have the basic outline worked out. For a star the size of the sun, we think, as you say, it will eventually expand into a red giant star – in fact it can go through more than one cycle of expansion. That will make things pretty tough for Earth!
Eventually the atmosphere of the red giant will blow off leaving a bright but small white dwarf star, which will, after a very very long time cool and dim. We don’t think there will be an actual explosion, though – that would be a supernova. That only happens with stars that are more massive than the Sun.
I have not gotten into all the details, but you can read more here:
https://www.windows2unive...uff/tourstars_1.html https://www.nasa.gov/audi...r_evol_feat_912.html Terry