According to the Doppler effect, the volume (perceived loudness) of sound is higher when an object approaches the observer and lower when it recedes from the observer. The Doppler effect is the change in frequency (and hence perceived pitch) and amplitude (volume) of a sound wave as the source of the sound and the observer move relative to each other.
When an object producing sound moves towards an observer (or vice versa), the sound waves are compressed, leading to a higher frequency and higher perceived pitch. Additionally, the compression of the sound waves also leads to an increase in the amplitude (or intensity) of the sound waves, resulting in a louder perceived sound.
Conversely, when the object producing sound moves away from the observer (or vice versa), the sound waves are stretched, causing a lower frequency and lower perceived pitch. The stretching of the sound waves also leads to a decrease in the amplitude (or intensity) of the sound waves, resulting in a quieter perceived sound.
This effect is commonly observed in everyday situations, such as when a car or a train approaches and passes by, the sound of its engine seems to get louder as it comes closer and gradually gets quieter as it moves away. The Doppler effect is essential in understanding the changes in sound perception due to relative motion between the source of sound and the observer.