To free up iPhone device storage, see this Apple articles below:
If you need more space for an update on your iPhone, iPad, or iPod touch
https://support.apple.com/en-us/HT203097
How to check the storage on your iPhone, iPad and iPod touch
https://support.apple.com/en-gb/HT201656
Clear Other storage on your iPhone or iPad
https://support.apple.com/en-us/HT211686
What's the difference between device storage and iCloud storage?
https://support.apple.com/en-us/HT206504
About iCloud -> see this Apple articles below:
How to use iCloud on iPhone
https://support.apple.com/en-gb/guide/iphone/iphde0f868fd/ios
See this Apple article: Set up and use iCloud Photos
https://support.apple.com/en-in/HT204264
Set up iCloud Drive
https://support.apple.com/en-us/HT204025