The threat to the Sun's astrophere
The astrophere/heliosphere performs a vital function in that it shields all the planets from cosmic radiation that would otherwise damage Earth’s ozone layer and make life extremely difficult if not impossible.
However, we cannot count on the heliosphere being permanent. The Sun is orbited by its planets but it is also in orbit around the heart of the Milky Way, being situated on one of its spiral arms. As it performs this orbit it occasionally encounters dense clouds of dust and gas and these therefore enter the Solar System. When this happens, the solar wind cannot penetrate as far as it once did and the heliosphere contracts as a result.
It has been calculated that when the Sun is proceeding through such a cloud, the limit of the heliosphere could be within Earth’s orbit, thus exposing the planet to external cosmic rays and also dimming the light of the Sun due to the intervening dust, leading to ice ages.
How often does this happen? Estimates vary, but it could be between one and ten times every billion years, meaning that the worst scenario condemns Earth to this hazard once every 100 million years!
However, things would not be so bad if the Sun were smaller and dimmer than it is. Three quarters of all stars in our galaxy are red dwarfs and, in order to be habitable, a planet would need to be a lot closer to its star than is Earth to the Sun. The astrophere of a red dwarf is far more likely to be able to protect its planets from external radiation, whatever the star may encounter, than is a yellow mid-sequence star like the Sun.
So we are all in deadly danger! However, given the immense time sequences involved, the chance of anything of this kind occurring during the lifetime of anyone reading this is extremely remote!