Before downloading anything, it's worth checking whether the actual files still exist. A library file (iTunes Library.xml, a Winamp/foobar playlist, etc.) is just the track list with paths, so look at where those paths point: old external drives, an old laptop's disk, backup DVDs. If a drive was wiped or reformatted, PhotoRec (free, from the TestDisk project) can often carve MP3/M4A/FLAC files back off it.
Anything in there that you bought from iTunes can be redownloaded for free: Apple Music app or iTunes > Account > Purchased > Download All (Apple Support has the steps for Mac, Windows and iPhone).
For re-buying the rest cleanly, Bandcamp downloads are DRM-free in MP3 V0/320, FLAC, ALAC, AAC, WAV and more, and you can grab another format later from the receipt link. Using the library file as a shopping list saves a lot of guessing.
