YT-Dlp is also an option, but I haven't used it, so I can't say anything about the capabilities. Spotdl uses youtube-dl as a backend, and yt-dlp is a fork of youtube-dl, so it probably works fine too.
How to find tokens for Deemix - decide for yourself. You can buy premium for a month and download all the music you can. Or find the key on the sites. There are also several groups on Telegram where you can find them. Deemix does not always download tracks the first time, so it is necessary to execute the command several times. Some tracks cannot be downloaded at all. The larger the playlist, the more possible errors. From a playlist of 1200 tracks, about 200 are not downloaded.
Spotiflyer often fails to download a song, so it should only be used if you don't have access to a PC.
Spotdl works almost perfectly. During all this time I have not had a single mistake. Even large playlists download without errors.
After you have downloaded all the tracks, you can upload them to the cloud storage. I use MEGA.
Now you have a pocket streaming service that you have full control over.
There's also a way to use Spotify playlists in Deemix if you get an API token from Spotify. IMO it's the best of both worlds (considering I dislike the 320kbps downloads that Spotify offers, while their collection is easier to traverse so I keep my playlists there).
If someone uses telegram I have deployed bots
@deezertogdrivebot
It downloads tracks from deezer and supports both Spotify and Deezer link
So by using Spotify playlist you can get Flacs
@bayapplemusicbot
This bot can download files from Apple music but in 256Kbps (ALAC not supported)
Both bot supports tracks,albums,playlists