As Servant of Cats suggests, iCloud Backup and iCloud Photos are two different things.
iCloud Backup makes copies of some things on your iPhone or iPad and saves them so that you can restore you device from scratch, like if you buy a new phone. See this:
What does iCloud back up? - Apple Support
Note that iCloud Backup only backs up things that are not otherwise copied to iCloud. So, if you also use iCloud Photos and iCloud Drive, then iCloud Backup doesn't repeat those things.
iCloud Photos is a synchronization service. When you engage iCloud Photos on a device, then the Library on that device is kept exactly 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 on your Mac, then that picture is deleted at iCloud and on all the other devices.
So you can't think of iCloud Photos as a backup service, since it backs up mistakes, and there's no way to undo them. Whatever you do with Photos on your device-- it happens everywhere else.
iCloud Photos is completely separate from iCloud Backup.
If you're interested in saving storage space, you can use Optimize Storage on the Mac, on your iPhone, or on your iPad. You can set this on any device, independent of the others. If you set a device to "Optimize Storage," then Photos may store only smaller images on the device and rely on iCloud to keep the full sized images. So, if Optimize is chosen, and you want to edit or crop a picture, Photos will reach out to iCloud to get a full sized image for you to zoom in on. It's the same for zooming or printing or anything that demands the full picture. Your optimized Library may take up less than 20% of the space of a fully downloaded Library. On my iPhone, Photos takes up way less than 10% of the space it uses on my Mac. But an optimized Library may be kept larger than that if the extra storage space is not needed.
Does that make more sense?