For the music apps with subscription model, the content will be encrypted. It can be played only on their apps.
For YouTube, one can extract the audio using 3rd party software.
I have used YouTube-dl on my Linux machine. It’s a open source, command line tool based on python. It allows you to extract audio in different formats.
Last time I used it, I ran into lot of issues related to python versions and took a while to fix them.
There are many online YouTube audio extractors but I wouldn’t trust them. They can inject malware and other malicious programs along with the audio file.
The legit way is to purchase the songs which will let you download the files in a standard format that can be played in any standard media player like
snaptube ios.
I haven’t purchased any songs in digital format so I will let others recommend where to purchase songs.