For a string wave, the medium is a string. For sound waves, the medium is air. What is the medium for a light? We know that we can detect light from distance stars and galaxies, so apparently light can travel through empty space.
Don’t copy the last sentence; I didn’t paste this if you were thinking.