you can get music off your iphone just like an ipod, so google something like "get music off ipod" and there's plenty of programmes out there (both paid and free).
for windows i use ephpod or ehppod (idk which 1, im dyslexic 😀) it should work with an iphone. just export all the music out. it will rename, sort it out by artist etc. quite a handy tool.