If you do not want Photos from your iPhone and Mac being uploaded to iCloud, you need to Disable iCloud Photos option on your device.
Switch OFF iCloud Photos on iPhone & Mac
iCloud Photos (previously known as iCloud Photo Library) allows Apple device users to upload Photos from iPhone, iPad or Mac to Apple’s iCloud storage service and access them on any device from anywhere in the world.
Photos uploaded to iCloud are stored in their full resolution and get automatically synced across all your devices that share the same Apple ID.
Since, Photos & Videos consume a lot of storage space, enabling iCloud Photos on iPhone is likely to quickly fill up the limited 5 GB storage space available in your Free iCloud Account.
The option in this case is to either buy additional iCloud Storage space or disable iCloud Photos on your iPhone and Mac.
Is it Possible to Turn OFF iCloud Photos Without Losing Photos?
When iCloud Photos is enabled on iPhone or Mac, the Photos that are stored on these devices get automatically uploaded to iCloud and are stored in your iCloud Account.
At anytime, you can disable or switch OFF iCloud Photos on both iPhone/Mac and this prevents Photos from these devices being uploaded to iCloud.
Note: If Optimize for storage option is enabled, original Photos stored on your device are likely to be optimized versions of the original images.
1. Disable iCloud Photos on iPhone
As mentioned above, you can disable iCloud Photos at any time on iPhone by following the steps below.
1. Open Settings > scroll down and tap on Photos > on the next screen, move the toggle next to iCloud Photos to OFF position.
2. On the confirmation pop-up, select Remove from iPhone option to confirm.
Note: If there is enough storage space, you can select Download Photos & Videos option, which saves a copy of iCloud Photos on your device.
2. Disable iCloud Photos on Mac
You can disable iCloud Photos at any time on your Mac by following the steps below.
1. Open the Photos app on your Mac > click on Photos tab in top-menu bar and select Preferences… in the drop-down menu.
2. If you are not Signed-in, click on Continue and follow the instructions to Sign-in to your Apple I
3. On the Preferences screen, switch to iCloud tab and uncheck iCloud Photos option.
Note: When iCloud Photos is enabled, you can download a copy of iCloud Photos to your Mac by checking Download Originals to this Mac option.