Oops-- there seems to be confusion, here. iCloud Photos is a synchronization service. When you engage iCloud Photos on a device, then the Library on that device is kept just the same as the iCloud Photos Library. So, for instance, if you take a picture with your iPhone, it is added to the iPhone's Photos Library, copied to iCloud Photos Library, and then copied to the Photos Library on each of the other devices that you have connected. If you delete a picture from Photos on your Mac, then that picture is deleted at iCloud Photos and on all the other devices.
You can store pictures in iCloud without having them in iCloud Photos-- by putting them in iCloud Drive.If you do that, then you can still see them on devices connected to iCloud Drive, but you can't edit them or add comments, etc. Also, you have to decide if you want to store the unmodified original files, or if you want to keep edits and comments. You may choose to save both, taking up twice the storage space. You would put pictures in iCloud Drive, or anywhere else, by using Photos' File>Export function. Then if you delete these pictures from your Mac Photos, they will be deleted from iCloud Photos, but the files will remain wherever you exported them.
A Photos Library has way more data than just the pictures, so exported individual picture files lose valuable information. You cannot use or even store an actual Photos Library in iCloud Drive-- but you can store picture files there.
You didn't say why you are using iCloud Photos. If you are not in need of synchronization of your Photos Libraries on your Mac and on your iPhone, then iCloud may not be useful to you at all.
The best backup, for instance, is to use Time Machine on an external drive. For just pictures, the best backup is to drag your Photos Library to an external drive, making a copy of it there.
We can help with details…