Sound, a form of energy, consists of vibrations that need a medium to propagate. In a vacuum, these vibrations can't propagate due to the lack of a medium.
Sound propagates by causing the particles in the medium to vibrate. A vibrating source transfers the vibrations to the surrounding medium, which can be solid, liquid or gaseous.The resulting vibrations create varying pressure regions by compressing and decompressing the particles in the medium, and through this process of compression and decompression, sound waves propagate through the medium. During the propagation of sound, the particles of the medium receive these vibrations and transfer them to the surrounding particles, allowing sound to travel.
In a vacuum, there are no particles that can transfer and carry vibrations, so sound cannot travel. The most well-known example of a near-vacuum is outer space. Technically space is not entirely empty, and there are gaseous particles in space through which sound can propagate. However, these interstellar gases are much less dense than earth's atmosphere, meaning that there are fewer particles per unit of volume in space. So although sound is propagated through space, human ears are not sensitive enough to detect it. Thus, people consider space to be soundless.