You can export your data from Spotify, and use that as a basis for downloading songs via for example yt-dlp (this can be automated), or slowly build it up again over time in whatever system you set up by buying the albums/compilations containing the songs.
You can export your data from Spotify, and use that as a basis for downloading songs via for example yt-dlp (this can be automated), or slowly build it up again over time in whatever system you set up by buying the albums/compilations containing the songs.