You cannot move photos to the cloud and then delete them from your device. That’s not how iCloud works or how iCloud Photos works. iCloud is not off device storage. It is a syncing service that allows you to see all of your photos on all of your devices and allows all actions that you take with your photos to be reflected across devices. IOW, if you delete a photo on your phone, you delete it everywhere.
Backing up to iCloud doesn’t allow you to store the photos in the cloud either. If you use iCloud Photos, photos are not included in the backup.
When you use iCloud Photos, if you turn on Optimize Storage, that will help you save some space on your device, but you still need space in iCloud to use for the photos to sync to. Maybe this will help.
Set up and use iCloud Photos - Apple Support