you could do this by just replacing the vanilla audio files in a resource pack.
minecraft.wiki lists the filenames of all vanilla music in the current versions of both bedrock and java edition, but from what i can find, it doesn't list the exact filepath.
what i would personally recommend doing, is using
sounds.json instead. this will give you much greater control of which music plays in which portions of the game. (for example, if you were to just replace the audio file for bromeliad, it would play in all jungles, most forests, and cherry groves. but with sounds.json, you could have a different track in each of these places, or have the same track play in more places if you so desired.)
unfortunately, java edition has decided that other aspects of the music (the length of silence between tracks, which biomes share tracklists, etcetera) is defined by the worldgen files in a data pack. for some reason. which means you can't change those with just a resource pack.