Hi
I want to make a custom loader layout that before it goes to the next layout it has downloaded all the sounds and musics
Develop games in your browser. Powerful, performant & highly capable.
Assuming you know how to make a custom loader layout
https://www.scirra.com/tutorials/318/how-to-use-loader-layouts-to-make-custom-loading-screens
you can use "preload" with the audio object. However, if your making a mobile web game, I suggest you read the manual on the audio object to understand how audio downloads, sounds vs. music, works.
https://www.scirra.com/manual/109/audio