Hi that is not correct, iCloud is a syncing service. By default everything in your iCloud folder on your Mac ( which is stored on your Mac’s drive) is then uploaded to Apple’s servers. In settings under Apple ID iCloud there is an option to Optimise Mac Storgae, which will keep the original in iCloud and remove the file from your local drive only if your Mac starts to Run out of disk space.
it is confusing as on iOS devices iCloud does not download the files until you click the download icon for the file.
So in summary on the Mac it is not possible to only store files on iCloud, but not have them take up drive space, unless you have optimize Mac storage turned on and you are low on space.
I guess you could turn iCloud drive off on your Mac, and use the iCloud web interface to manually transfer files to iCloud, but that would be a pain to use IMO.