Usually, the photos you delete on your iPhone get deleted from the iCloud too. There is a way to prevent this - by turning off photo-sharing. Go to Settings on your iPhone and tap on your name. Then, tap on iCloud > Photos and turn off the sync feature. Remember that once you turn it on again, the photos will be deleted from iCloud.