Downloading music in M4A format from iTunes (now Apple Music on Mac) is the standard for purchased songs, as it provides high-quality, DRM-free audio that is widely compatible with most modern devices. How to Download Purchases as M4A
.M4P is an older protected format used by Apple before 2009. If you have these old files in your library, you may have issues playing them on newer devices. Apple offered a way to upgrade these to DRM-free iTunes Plus tracks in the past, but that program has largely ended. You may need to burn these to a CD and re-rip them to strip the protection.
. However, MP3 is more universally compatible with older hardware M4A vs. M4P: M4A files are and can be played on non-Apple devices