It's possible to use Vanilla Minecraft's sounds and music in Audio elements and other stuff that take OGG audio files.
To access Vanilla sound resources, you need to know their real resource location.
For example, the bromeliad.ogg
music track is located at assets/minecraft/sounds/music/game/
, so its resource location would be minecraft:sounds/music/game/bromeliad.ogg
.
This image shows the resource location used in an Audio element:
An easy way to see the real resource locations of audio files is by using mcasset.cloud.
This website lets you browse Minecraft's assets.