Hello lucuell!
Thanks for reaching out to the Apple Support Communities! From your post I see that you’re trying to add music to a movie you’re creating in iMovie on your Mac. You’ve come to the right place. When you’re working with adding music to an iMovie project the tracks need to be from the iMovie sound effects library, GarageBand, or from your iTunes Library.
Your iTunes Library consists of music which you have purchased online or have imported from CD. This does not include any music which you have downloaded for offline listening from Apple Music.
Songs from Apple Music are all protected by digital rights management can’t be used in iMovie. You can read more about the different types of music which can be aded to a project in this article under, “Add background music stored on your device,” located at the top: iMovie for iOS (iPad): Add audio. While this article references iMovie for iOS, the types of files which can be used are the same when working with iMovie for Mac.
If you’re not sure the source of the song you’re wanting to use here’s how you can check. In your iTunes Library, right click on the song > select Song Info > File. The first entry on on the File tab is for “kind.” This typically will show one of these options: MPEG audio file, Purchased AAC audio file, or Apple Music AAC audio file.
You can also turn on the iCloud Status in iTunes to see if the song was purchased from the iTunes Store, added from Apple Music, uploaded, or something else. Check out this article for more information about the iCloud Status: About iCloud Music Library icons and status.
Let us know the results.
Cheers!