You can use royalty-free or purchased music, but you must have the rights to use it.
Viewing post in What "existing media" is allowed?
Yes, it applies to code, images, and sound, but if you follow a very basic tutorial for code or something and change it a lot then that will be allowed. We don’t want 35 identical platformers with that stupid eye character. For images and sound if they are under a CC License or are royalty free then its fine