How to put music on my mac from my iPhone?

I got a new mac for christmas and I don't know how to transfer my music from my iPhone 4 to the mac book pro i need help thank you

Plug it in and press sync…

Should happen when you sync.open ITunes and make sure its set for your ITunes account but even that shouldn't matter for this issue.

Speaking of trasferring iphone music to mac, we have to use the third program called iphone to mac transfer tool.

I have tried many transfer tools just like istonsoft, Amacsfot, illsoft, xilesoft, etc, but the most easy-to-use is belonging to the Amacsoft iPhone to Mac Transfer, which makes it possible to back up iPhone music, videos, movies, photos, podcasts and TV programs and more to Mac easily and quickly. It really a versa software for iTunes. But it's worth taking a moment to flag the fact that this iPhone Transfer for Mac program works just like iTunes but easier than iTunes.

More reading you can get:
http://www.amacsoft.com/iphone-to-mac-transfer.html
I do hope it can work well for you, best wishes!

Assuming you purchased the music go to:
file->devices->transfer purchases from -device name here