Frustrated iPad user 199 wrote:
They’re from a combination of iTunes Store downloads and mp3 conversions from my CD collection. The bulk of what’s now on my phone we’re converted before I switched to iOS (iPhone 6) and were on my old PC. I’ve been migrating my music from old phone to new phone over the years and although I have backed up my phone to iTunes and to my local PC, it still bothers me that I can’t sync them. Converting music to mp3 is extremely time consuming so I don’t want to lose my library...
Thanks for the help!
The songs which were purchased/downloaded from the iTunes Store will still be associated with your Apple ID that was used at the time of purchase. If you still have access to that ID and use it, you will be able to re-download those songs on iTunes on your new/current PC. Download previous iTunes purchases on PC - Apple Support
Your CD collection was ripped and saved on your old PC. If you still have access to that data (the old PC itself or some backup of it), then you could simply migrate the songs/data from that PC/backup to iTunes on your new PC. Also, if you have the old iTunes Library you could migrate the library itself ... Move your iTunes library to another computer - Apple Support
Syncing between Apple iTunes and iPhone, works in one direction when it comes to music downloaded from sources other than the iTunes/App Store (liked ripped CDs). That direction is from iTunes to iDevice and NOT vice-versa.
So, officially, there is no method that Apple has created to transfer songs from iPhone to iTunes (PC), otherwise this would violate and propagate respectively copyrights and/or piracy.
There are third-party apps which claim to do this, though.
How to Transfer an iTunes Library to a New Computer - lifewire.com