The "yay" sound is a very common sound effect that is used in a variety of situations. It is often used to express happiness, excitement, or approval. It can also be used to show relief or triumph.
The origins of the "yay" sound are unknown, but it is likely that it developed from a variety of different sources. It is possible that the sound was originally made by imitating the sound of laughter or cheering. It is also possible that the sound was developed from onomatopoeic words such as "hooray" or "yahoo."