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
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.