MP3 is the format that taught music to travel: small, scrappy, and welcome absolutely everywhere. It was born in 1993, Fraunhofer Institute, Germany, and its real weak spot is holding fine detail at low bitrates: it stays small by quietly discarding sound.
M4A is AAC in Apple's favorite outfit: the audio-only MP4 your iPhone speaks natively. An MP4 container holding only audio: usually AAC, occasionally Apple's lossless ALAC. That makes it the right destination when what you need is sounding great anywhere in the Apple ecosystem.