How to transfer music from iPhone 4s to Mac?

My mac was stolen so I got a new one but I lost all my music. How do you transfer the music on your iPhone to your new mac?

Use iTunes. Sync iTunes with your library and then all your music will on your MAC.

Log in to iTunes with your apple ID on your mac. Connect your iPhone to the Mac. You should be able to transfer via the "My iPhone" thingy in the sidebar
Hope I was of help!