What is the primary function of the Earth's magnetic field regarding cosmic radiation?

Answer

Deflects most of the charged GCRs, diverting their paths.

The Earth's magnetic field acts as a defense mechanism by deflecting the paths of the majority of charged Galactic Cosmic Rays away from the planet's surface.

What is the primary function of the Earth's magnetic field regarding cosmic radiation?
Rayradiationcosmicdangerlethality