It sounds like you ran out of space on the phone.
iCloud is a syncing system, not an external 'hard drive'. If you delete them on your device, they will delete from iCloud. To increase space available, go Settings/Your Name/iCloud/Photos and select Optimize iPhone/iPad Storage. That will reduce the space required by about 90% when fully effective.