How to get songs from my iPhone to my mac?

I just bought a bunch of songs on my iPhone. How do I get them on my mac so i would still have them if my phone broke or something?

Use a usb that comes with your iphone

Plug your phone in, make sure your mac is authorized, (if not go to the half black half white square go down to iTunes store and click authorize this computer) then sync your music to your computer.