iCloud is a syncing service. The main purpose of iCloud Photos is to keep the Photos Library in sync and identical on all your devices. If iCloud Photos is enabled on a device, anything you do on this device will sync to iCloud as the central storage of your Photos library - importing new photos, deleting photos, adjusting photos. Once iCloud has been updated to reflect the changes you have done on your iPhone, the changes will sync from iCloud to your other library. so any photos you delete from a device you sync with iCloud Photos will be deleted from iCloud as well and all your other devices syncing with iCloud.
If you want to keep your photos in iCloud but save storage on your iPhone by syncing with iCloud, enable the Setting "Optimise Storage" for iCloud Photos. Then iCloud Photos will automatically remove high resolution originals from your iPhone, and keep just optimised, smaller version on the iPhone, if you need to free storage. But do not delete any photos on your own, that you want to keep in iCloud.