The two are completely different.
Cosmic rays are high energy particles of cosmic origin (produced in the sun, supernovae, gamma ray bursts, etc.). It is just a catchall term for any high-energy radiation coming from outer space.
Cosmology, on the other hand, is the study of the universe as a whole, including its birth, evolution, and final fate. So cosmology as a science asks questions like "How big is the universe?", "What is the universe made of?", or "What was the universe like when it was very small?".