You will have to manually change the checkbox on the Mac when you want to change back up methods between iCloud and your Mac.
Set up the phone to back up to iCloud and backups will occur automatically every 24 hours if the phone is connected to the charger. Or you can choose Back Up Now manually from the iPhone.
How to back up your iPhone, iPad, and iPod touch with iCloud - Apple Support
When you want to back up the phone to the Mac, you will have to select the check box on the Mac to do so. After the backup has run, then select the check box for iCloud backups again.
How to back up your iPhone, iPad, and iPod touch with your Mac - Apple Support