iCloud is syncing storage. Basically something on iCloud puts it on all other devices at the same time. It isn't like a external hard drive. iCloud can save some space, but by optimizing.
Click on this link to "Learn the difference between your device and iCloud storage, ways to manage your space, and where to buy more if you run out." --> What's the difference between device storage and iCloud storage? - Apple Support
Take-away:
1. Storage on a device itself is fixed and cannot be upgraded. You have to change your present device for one with more capacity.
2. iCloud storage is on Apple's main computers. It is not a like a normal storage hard drive but by using optimization settings on your device it can help free up device storage. Lesser used items and larger file versions can be stored in ICloud and you can get access while connected to the Internet. It does not turn a 64 GB storage device into a 64 (or whatever) + 50/200/2TB GB device but if you have a lot of things that aren't being used much, or you don't mind only having lesser quality photos on your device it can free up extra space so you can make the best of the GB you do have on the device itself.
How to free up storage space on your Mac - Free up storage space on your Mac - Apple Support
Optimized Storage [macOS Sierra or later] helps you save storage space space by storing your content in iCloud and making it available on demand:
- When storage space is needed, files, photos, movies, email attachments, and other files that you seldom use are stored in iCloud automatically.
- Each file stays right where you last saved it, and downloads when you open it.
- Files that you’ve used recently remain on your Mac, along with optimized versions of your photos.
Use iCloud Photos to store photos in iCloud - Apple Support
Optimize Mac Storage: Stores smaller versions of your photos on your Mac when storage space is limited, and keeps the original, full-size photos in iCloud. Choose this option to conserve space on your Mac. To restore the originals to your Mac, just select “Download Originals to this Mac.”
See used and available storage space on your Mac
System Information User Guide for Mac - Apple Support