how does the earth's magnetic field protect us from cosmic rays
Earth's magnetic field As well as deflecting the solar wind, the Earth's magnetic field deflects cosmic rays, high-energy charged particles that are mostly from outside the Solar system. (Many cosmic rays are kept out of the Solar system by the Sun's magnetosphere, or heliosphere.[27]) By contrast, astronauts on the Moon risk exposure to radiation. Anyone who had been on the Moon's surface during a particularly violent solar eruption in 2005 would have received a lethal dose.[24]