You are correct that sound waves require a medium to travel through, such as air, water, or a solid material. In the absence of a medium, sound waves cannot propagate and be heard in the conventional sense.
Sound is essentially a mechanical wave that travels through the vibration of particles in a medium. When an object vibrates, it causes neighboring particles to vibrate, and this mechanical disturbance propagates through the medium as a sound wave. When the sound wave reaches our ears, it causes the eardrum to vibrate, which is then processed by the auditory system in our brain, resulting in the perception of sound.
In a vacuum or outer space where there is no medium, such as air or water, sound waves cannot travel and be heard in the usual way. Since there are no particles to vibrate and transmit the sound wave, the wave simply cannot propagate.
However, it's worth noting that there are other means of detecting and interpreting electromagnetic waves, such as radio waves or light, which can travel through a vacuum. In space exploration, for example, scientists use instruments that can detect electromagnetic waves emitted by celestial objects and convert them into signals that we can interpret as sound or visualize through other means. But it's important to understand that this is not the same as hearing sound waves through the auditory system.