Use <audio> HTML element with property loop:
A Boolean attribute: if specified, the audio player will automatically seek back to the start upon reaching the end of the audio.
See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio#loop