How to put music on your iPhone to a new computer?

I had all of my music on iTunes on my old computer, but it broke and now I have a new one. Considering that my music wasn't on iCloud can I still somehow put my music on the new computer to sync to my new phone?

You can still get your music back from your old computer by signing in on your iTunes account and re-downloading all your music you have purchased into your computer and boom!