Your iPhone does not have enough space to store all high-resolution photos from iCloud.
Please compare
Settings>your name>iCloud>Manage Storage
And
Settings>General>iPhone Storage
This will give you a fair idea of how to manage your device storage.
Some of the links below may help
- Manage iCloud Photos iCloud Photo Library Help - Apple Support
- Manage your iPhone Storage --> Manage your photo and video storage - Apple Support
- Manage your iCloud Storage → Manage your iCloud storage - Apple Support