See the articles How to back up your iPhone, iPad, and iPod touch with iCloud - Apple Support
Back up and restore your iPhone or iPad to your Mac or to iCloud - Apple Support
About missing information after you restore your iPhone, iPad, or iPod touch with iCloud Backup - Apple Support
About your photos
When you use iCloud Photos, your photos and videos automatically upload to iCloud. They aren’t included in your nightly backup. After you restore your device from iCloud Backup, stay connected to Wi-Fi so that your photos and videos can begin to download.
If you haven’t turned on iCloud Photos, iCloud Backup may include photos and videos in your Photos or Camera Roll. Not sure if iCloud Photos was turned on when you made the backup? After you restore your device, check Settings > [your name] > iCloud > Photos. If iCloud Photos is turned on, then the photos were stored in iCloud Photos.
If the photos and videos were included in the backup, they’ll download to your iOS device in the background when you restore. Stay connected to Wi-Fi until the process finishes. The time it takes to restore depends on the size of your backup and the speed of your Wi-Fi network.