Mac storage basics · iPhone and iPad backups and updates
How do I stop my Mac backing up or syncing my iPhone every time I plug it in?
Short answer: Select the iPhone in Finder and untick Automatically sync when this iPhone is connected on the General tab, then Apply. Back up manually with Back Up Now when you want.
Connect the iPhone, select it in Finder's sidebar, and on the General tab untick Automatically sync when this iPhone is connected. Then click Apply.
You can still back up manually with Back Up Now whenever you choose, which keeps backups from quietly piling up on a Mac that's short of space.