Save space on iPhone / iPad using Settings and iCloud
Free up space on your device
You can make storage space available on your iPhone, iPad, or iPod touch when you use iCloud Photos and turn on Optimize Storage. Or you can remove content from your apps—like photos, music, and Podcasts—or delete the apps that you're not using.
- Settings > [Tap your Name] > iCloud > Photos > Optimise iPhone Storage
(Refer Pic 1} - Settings > iTunes & App Store > Offload Unused Apps [Enable] (Refer Pic 2}
Remaining all items are synced with your iPhone for use when you plan to change device or lose device.
https://www.youtube.com/watch?v=bnhuHSv_WrI
About storage on your device and in iCloud - Apple Support
https://support.apple.com/en-in/HT206504