Hello danique48,
there are essentially 2 separate things: iCloud Backup and iCloud Photos. When you do an iCloud Backup on your phone, it will include Photos, unless you have iCloud Photos turned on. In case you don’t have iCloud Photos turned on, iCloud Backup will automatically include Photos in its backup. This is to ensure you’re not missing any photos.
If you have done a backup in the past that includes photos (because you didn’t have iCloud Photos turned on), and you delete the backup, then the photos from that backup are not there anymore.
If you have iCloud Photos turned on, then all your photos are stored in iCloud already. This way the iCloud backup doesn’t need to include them anymore. If that’s the case for you, you are ok to delete old backups because your photos are already stored in iCloud via the iCloud Photos being turned on.
It’s recommended to turn on iCloud Photos, this way your photos are stored in iCloud (which serves as a backup). When you lose your phone or erase it, you would not lose your photos ever. The iCloud Backup takes care of anything else you’ve stored on the phone. If you have not turned on iCloud Photos, then your photos are backed up via iCloud backup, but if you delete any old backups you might lose the photos that were part of that.
You can learn more here:
https://support.apple.com/en-us/HT207428?