However, the universe is transparent to other types of light, such as radio waves and gamma rays. This is why we can use telescopes to observe the universe at these wavelengths.
The reason the universe is transparent to certain types of light and not others has to do with the properties of the particles that make up the universe. Visible light is made up of photons, which are particles that have a relatively low energy. Dust and gas particles can easily absorb or scatter photons, so visible light is blocked by these particles.
On the other hand, radio waves and gamma rays are made up of photons that have a much higher energy. These photons are not as easily absorbed or scattered by dust and gas particles, so they can travel through the universe without being blocked.
This means that the universe is transparent to certain types of light and not others because the particles that make up the universe interact differently with different types of light.