Why a normal delete isn't enough
With iCloud Photos on, deleting a photo deletes it from your iPhone and every other device using the same Apple Account (Apple).
Step by step
- Check the photos are in iCloud: open iCloud.com/photos on a computer and look for recent ones.
- On the iPhone, go to Settings > your name > iCloud > Photos.
- Turn off Sync this iPhone.
- Choose Remove from iPhone. The copies on the iPhone go; the ones in iCloud stay.
Apple describes both choices: Download Photos & Videos keeps a copy on the device, Remove from iPhone removes them without saving a copy (Apple).
The button not to press
Turn Off and Delete Photos, under iCloud > Storage > iCloud Photos, does the opposite: it deletes your photos from iCloud 30 days after you stop using the service (Apple).
Only need space, not deletion?
Optimize iPhone Storage keeps full-resolution originals in iCloud and smaller versions on the iPhone, and it's on by default (Apple). Check it's selected before turning sync off.
After sync is off
New photos you take stay on the iPhone only, and deletions there no longer reach iCloud. If you also want a copy outside Apple, see backing up photos without iCloud.
Private photos, out of the shared library
Secret Calculator Vault Photo (Calc+) keeps private photos and videos in its own encrypted vault, apart from the Photos library that syncs to your other devices.