H2S acts only as a reducing agent while SO2 can act both as a reducing and oxidizing agent because
S in H2S has - 2 oxidation state
S in SO2has oxidation state + 4
In H2S, Sulphur atom exhibits (-2) oxidation state, which is the least for the pnictogen.
As for its highest oxidation state - Sulphur exhibits (+6) in H2SO4.
In SO2, sulphur exhibits a (+4) oxidation state, which is in between the extremes.
Hence SO2 shows both oxidising and reducing properties.