Buy it, download as FLAC, put in your preferred local infrastructure to play. Plex/Plexamp works well, as does local file storage and a good command line music client if you're less GUI-friendly or don't have the resources for running them.
Another source are good ol' CDs. If you know where to look you can get them cheap too. Specialist charity shops that specialise in records and CDs in student or wealthy areas are good, as are second hand stores online.
An alternative to self hosting is to use an online music locker. I wrote up a bunch here: https://www.blisshq.com/music-library-management-blog/2021/0... and (disclaimer) operate one myself: https://asti.ga
I made this to help though https://github.com/meeb/bandcampsync
Bandcamp is the only place to sensibly buy music you can own these days which is pretty depressing.
That doesn't happen on other platforms?
I had two albums of a band who's front man died and they disbanded. The albums were removed but I still have them in my collection. You cant find it on the site anymore but I can still download and play them.
However, Bandcamp does abide by the laws that require them to stop distributing music at the rights holders' request.
No music service, or any service, for that matter, will guarantee access to files without regard to laws. Some will try harder, some have tried harder and been beaten down.
The most infuriating thing is that bandcamp gaslights you on it. I eventually confirmed that yes, I had bought that song, after tracking down the receipt in my email provider or something (it was hidden from purchase history, bandcamp "I can't find my music" link didn't mention this, etc etc).
This isn't just an issue for playing music though - if you buy a bunch of stuff but don't download it right away you could loose it too. I bought the track I mentioned right after it was released, and the substitution happened within a day or two of that.
Like, I get it, if there was some legal issue (pirated work - and then they should issue refunds). But the fact that bandcamp tries to hide it just means that they know they have no moral grounds here.
And you can even send a mail to the artist to ask them why they removed old albums and if they can provide you a copy.