If you ever used iTunes on the Mac to sync photos and albums with iOS, you could have problems enabling iCloud Photos, Apple’s synchronization and backup options for images and videos captured in and imported into iOS and macOS.
This situation can emerge as you switch from iTunes to iCloud sync in iOS. In Settings > [your name] > iCloud > Photos, when you tap the iCloud Photos switch to turn it on, you may see the message, “Photos sync from iTunes will be removed.” (Make sure at this step that you truly have copies of all those images, because proceeding will irreversibly delete them from your iPhone or iPad.)