See the 'How iCloud Photos works' section in this article:
Set up and use iCloud Photos - Apple Support
iCloud Photos keeps all your photos and videos in their original, high-resolution version. To save storage space on your device, you can turn on Optimize Storage. See the 'Make sure that you have enough storage' section in the same article above. For this to work, you may have to rent more iCloud storage:
Upgrade to iCloud+ - Apple Support
All that being said, I'm not sure how you have "already deleted photos from iCloud" if you haven't previously enabled iCloud Photos.