How do I stop my Mac from syncing my whole library to my iPhone?
This is fairly straightforward to disable. Follow these steps:


Launch iTunes
Go to iTunes > Preferences
Select the Devices tab
At the bottom, uncheck the Prevent iPods, iPhones, and iPads from syncing automatically
Exit Preferences


Let us know if this doesn't resolve your issue.