I prefer to buy, not rent music. Bandcamp is good for it and they sell FLAC. This is also fitting comparison to cassettes library a lot more than Apple Music where it's not your library, but Apple's.
iTunes won't even play FLAC files, so it's rather inconvenient for people with existing libraries. Yes I know I could convert it all to some proprietary Apple format, but it's easier to just not buy an iPhone.
The patents on AAC-LC (which is all that really matters when encoding at medium to high bitrates, and that very much applies to the files sold by the iTunes store, too) should have expired by now, given that it dates from 1997, and indeed Fedora has been including an AAC-LC encoder since late 2017.
There's only two ways. Apple Music (streaming) and iTunes Store.
iTunes Match lets you "upload" your library to Apple. It matches your library against Apple's catalog. If they have the song, you get a copy of their version of the song. If it doesn't have a match, they retain your uploaded file.
I have a lot of random local music that isn't on iTunes, and which you can't easily find anymore. For years, I was paranoid about losing my ripped copies of the files, but iTunes Match has preserved them for me, in the cloud, for years now.
I'm considering taking a break from spotify premium and I'm wondering what the cheapest way to buy music is these days. It seems like buying and ripping used cd's might actually be the way to go. Of course you don't get FLAC that way.
Other stores like 7digital are also good.