In certain cases, distance can indeed play a role in creating sound or affecting the perception of sound. One example is the phenomenon of resonance. When an object or a medium vibrates at its natural frequency or multiples of it, it can produce sound. Resonance occurs when an external force or stimulus matches the natural frequency of an object, causing it to vibrate and generate sound waves.
Regarding your mention of Earth, Sun, and Moon, they do not directly create sound in the conventional sense. However, their interactions can generate various waves or vibrations that are interpreted or detected as sound by scientific instruments. For example, solar flares or coronal mass ejections on the Sun can produce intense electromagnetic waves, including radio waves, which can be converted into sound waves for analysis and interpretation.
Similarly, the movement of the Earth's tectonic plates during earthquakes can generate seismic waves, which can be detected and converted into audible sounds by seismographs. These sounds are not audible to human ears directly but are converted into frequencies within the audible range for analysis.
In summary, while distance alone does not create sound, the interaction of objects, resonant properties, and other physical phenomena can generate vibrations and waves that we interpret as sound.