These sites have some recorded music that may be under a CC license and thus allow you more legal access than almost all other recorded music.
Want to use a recording from the public domain? You used to be out of luck--but now there is a cadre of composers who put up their music online for you, free to use.
If you've heard of some music "being in the public domain," that is referring to the actual composition--the score and the words that no one now owns and that you can record without having to pay royalties.
However, as you've been seeing, you are allowed a bit more flexibility if you are using the recording in a course project (although if you upload to YT and you are using any recorded music, it will be tagged as such). If the commercial will be aired in real life, the rules are still strict and you would need a recording artist's permission and you would have to pay royalties. Locate the artist's publisher and find out how to contact them about what is referred to as licensing the music for your use.
With that said, there is a new kind of licensing some people opt for called a Creative Commons license. If you find recordings with this license, the rules are different (still read the rules). Some composers also simply want to put their compositions out there. Search online for what you need.
Our book The Public Domain has awesome information on this topic and is very readable.
The surest way to not infringe copyright is to make your own music or record music of someone else that is now in the public domain (published before 1922).