nandohyphen1 By "moving library" I hope you mean moving your media, since iTunes libraries use a proprietary format.
That can be achieved easily by just copying the music files over to Linux. You'll find them inside the ~/Music/Music/ directory on a Mac (usually there's a 'Media' folder containing the files). For Windows, give that a quick Google search, as I don't use that OS.
Now, for software to manage your library, I think strawberry is a strong contender. Or maybe Audacious is more to your liking? There are quite a few players out there with varying abilities in library management.
As for buying music: your best bet is honestly still the iTunes store. Sadly you will need a device with macOS/Windows, but a VM would be fine for that task. The other alternative would be Bandcamp. I'd honestly stay away from Amazon; I'm not aware of any DRM they might have on music, but in general they're just awful in terms of consumer rights.