Hey KelvinFelipe!
It May depend.
One if the settings that may affect which photos are stored only in iCloud and not directly on your device is the Optimize Storage setting, this is meant to save space on your device while still having access to the photos to download if you need them:
Manage your photo and video storage - Apple Support
This would be my first guess on your issue, if this setting is on, then I may expect to see this, however if it’s not:
Can you say on what type of device this is? And likewise the available storage on this device? If this is the only device showing this? And the Optimize Storage settings on one it all of them?
Hope thy answered your original question, otherwise let us know!
Likewise, if you just recently restored a backup to a new phone, or enabled iCloud Photos in one of your devices, it may take time to download, if this is the case, and there is enough iCloud and device storage, I’d recommend just keeping the device charging as much as you can and keeping it connected to a strong network until the process has finished, cheers!