Yes, converting Apple Music to MP3 is legal, and you can do it with TunesKit Apple Music Converter.