iCloud can only help in a limited way with a shortage of storage on a device. See the information in What's the difference between device storage and iCloud storage? - Apple Support including the following excerpt:
Free up space on your device
Using the steps above, you might see a list of recommendations for optimizing your device storage, followed by a list of installed apps and the amount of storage each one uses. Tap an app's name for more information about its storage. If you don't see any recommendations, try these steps:
- If you use iCloud Photos and turn on Optimize Storage, you can lower the amount of storage that your photos use on your device.
- You can remove content from your apps like photos, music, and podcasts.
- You can delete apps that you're no longer using.
Learn more about how to optimize the storage on your iOS or iPadOS device.