The gas in the stratosphere that absorbs ultraviolet rays is ozone (O3).
Ozone molecules are particularly good at absorbing ultraviolet (UV) radiation, especially the harmful UV-B and UV-C wavelengths. This absorption process converts the UV radiation into heat, protecting life on Earth from its damaging effects.