Hi there,
Many people do become a bit confused between the difference between iCloud storage and the iPhone storage. They are two separate storages. iCloud is essentially a sync service or a service that stores your data in the cloud that mirrors your devices and the storage on your devices. For example, if you have a hundred messages on your iPhone, you will have a hundred messages in your iCloud storage. If you delete fifty of those messages from your iPhone, you will now also only have fifty on your iCloud storage. You can however, create a manual backup of your device. Essentially a screenshot of your device in time that you can restore to at a later date. So if you deleted those fifty messages by accident, you could recover them by restoring from a backup you had made before you deleted the messages.
There are alternatives to moving files from your iPhone and freeing up storage without using the iCloud backup/sync service. For example, you can navigate to iCloud.com on a computer, sign in and then download all the files you have stored on your iCloud to the computer. You can also connect your iPhone to a computer and move files over or create a backup on your computer and then safely free up storage on your iPhone.
Check out some of these articles for further information. Hope this helps.
How to download content from iCloud when using Optimized Storage - Apple Support
What does iCloud back up? - Apple Support
Download iCloud photos and videos - Apple Support
Manage your iCloud storage - Apple Support
What's the difference between device storage and iCloud storage? - Apple Support