For CDs, Amazon, ebay, or discogs. Digital music I usually get from the artist's webstore if possible, otherwise I'll buy it from Amazon or BandCamp.
One heads up, Buying and downloading digital music from Amazon is a pain in the butt if you have an Amazon Music subscription. Easy and straightforward though without.
Apple music is also possible but you have to burn the tracks to CD using itunes to move it out of Apple's ecosystem.
I also hear good things about Tidal but I've never used them.