Having more iCloud space than actual disk space (on macOS)?

You can do this for iOS and macOS. The iCloud controls will tell you that there’s not enough space to download all the files and that you’ll have everything in the cloud, but only some files cached locally.

So, you can enable save space / optimize photos which will resample images with lossy compression or just store thumbnails locally. For actual files, you will download them from the cloud when needed and only have a subset of them in local storage.

You don’t need to have as much local storage as your full files stored in iCloud.