Well... Stop deleting pictures you want to keep.
iCloud synchronizes your photos across all of your devices.
If you delete the photo on one device, that photo will delete everywhere.
If you’ve worked with two or more clients sharing a mail account, it works the same—delete a mail message in the server from one client, and it’ll delete everywhere.
Per Apple: How iCloud Photos works
iCloud Photos automatically keeps every photo and video you take in iCloud, so you can access your library from any device, anytime you want. Any changes you make to your collection on one device change on your other devices too.
Click on the following links to find more info:
Set up and use iCloud Photos - Apple Support
Manage your photo and video storage - Apple Support
Manage your iCloud storage - Apple Support
How to check the storage on your iPhone, iPad, and iPod touch - Apple Support
Archive or make copies of the information you store in iCloud - Apple Support