The sound action plays a sound in the world. Here is an example, this will play the anvil sound near all players every 3 seconds 5 times repeated:
# This is placed inside an event just like any other action issound 1:# * The name of the sound that will be played (refer to resources for list of all sounds)type:'block_anvil_land'# The target for this action, this will play for all players in the worldtarget:'all'volume:0.5pitch:0.5# Amount of times the sound will be repeatedrepeat:5# Delay in ticks between repeats (20 ticks = 1 second)intervalTicks:60# The location relative to the targets position so this will play for each player 5 blocks away from them on the X and Z axislocation:x:~5y:~0z:~5