New computer old iphone, how do i sync my music, apps and photos?

Recently bought a new computer because my last computer failed on me, deleting all my programs from my computer, so I downloaded iTunes but I'm not sure how to put all of my files from my iPhone to my new iTunes on my new computer without completely wiping out everything.

Any help will be much appreciated!

Need to download iTunes from apple.com and plug in you iPhone into the computer with the charging cable. And when your iPhone shows up on your screen click on it and it should show restore, sync, etc.