The same molecule has different roles by location
The diagram separates protective stratospheric ozone from harmful ground-level ozone and shows secondary formation from precursors in sunlight.Read the worked diagram
An upper stratospheric band associates ozone with absorption of ultraviolet radiation. A lower band shows nitrogen oxides and volatile organic compounds reacting in sunlight to contribute to ground-level ozone. The lower route is a formation sketch, not a balanced chemical equation.