Review this support article for the difference in device storage and iCloud Storage.
What's the difference between device storage and iCloud storage? - Apple Support
If you are using iCloud Photos, make sure you are using the Optimized Storage option. This will store only low quality versions of your photos on your device and the high quality versions will be stored in iCloud. This has the effect of freeing up some space on your device and will only download the high resolution version when it is needed on your device.
Using iCloud does not add storage space to your device, it is just to sync the data that you currently have. Using the Optimized Storage option as detailed above can also be used to offload apps that are not used very often to free up storage space. When you want to use the app again, it will have to be redownloaded from iCloud.