The time it would take for sound to reach you from another galaxy is an extremely long duration, and practically speaking, it is not possible for sound to travel through the vacuum of space.
Sound requires a medium, such as air, water, or a solid, to propagate as it relies on the compression and rarefaction of particles. In the absence of a medium like air in space, sound waves cannot travel or transmit.
However, electromagnetic waves, such as light, can travel through the vacuum of space and provide us with information from distant galaxies. These waves, including radio waves, infrared, visible light, ultraviolet, X-rays, and gamma rays, travel at the speed of light (299,792 kilometers per second or approximately 186,282 miles per second) in a vacuum. Therefore, we rely on detecting and interpreting electromagnetic radiation, rather than sound waves, to gather information about distant galaxies.
To put the vast distances into perspective, the nearest galaxy to our Milky Way is the Andromeda Galaxy, located about 2.537 million light-years away. This means that light from the Andromeda Galaxy takes about 2.537 million years to reach us. Sound, which requires a medium, would not be able to traverse this immense distance.