You are correct that sound waves require a medium to propagate, and in the vacuum of space, there is no air or other material to carry sound waves. Therefore, sound cannot travel through space as we traditionally understand it.
Gravitational waves, on the other hand, are different from sound waves. They are disturbances in the fabric of spacetime itself, caused by the acceleration of massive objects. According to Einstein's theory of general relativity, gravitational waves are ripples that propagate through the fabric of spacetime, similar to how waves spread out when you drop a stone into a pond.
Unlike sound waves, gravitational waves do not require a medium to travel through. They can propagate through the vacuum of space, unaffected by the absence of air or any other material. This is because gravitational waves are an inherent property of spacetime itself, and they carry energy and momentum as they propagate.
Gravitational waves were first directly detected in 2015, providing experimental confirmation of their existence. Since then, several gravitational wave observatories, such as LIGO (Laser Interferometer Gravitational-Wave Observatory) and Virgo, have detected numerous gravitational wave events, further advancing our understanding of these phenomena.