All Apple users who have an Apple ID have a free iCloud account with 5GB of storage. But, if we want, we can pay to expand that storage to 50GB, 200GB, or 2TB.
Although iCloud space can be used in many ways, it can also be used as a file store. Integration with Apple devices is great, just save the document in iCloud or drag it to the iCloud folder so that it is available both on your Mac and in the cloud, on iPhone or iPad. The management is totally automatic, you don't have to worry about anything.
However, when you work with a document that you put in the iCloud folder, you have opened it, you have edited it with the Mac, it remains on both the Mac and iCloud. This has an important advantage, which is to access and open it very quickly. But it has the disadvantage of taking up space on your Mac's hard drive.
If you will no longer be working with certain files because you finished what you were doing and you need space because you have a very full hard drive, you can tell macOS to remove that file from your Mac and leave it alone in iCloud. Just press Ctrl + Click on the file in question and choose the "Delete Download" option.
The file will still be there but you will see that it has a small cloud indicating that it is no longer on your hard drive but in iCloud.
You can work with the file in the same way you have done up to now, it does not assume any inconvenience as a user, simply that when you reopen it, if it is very large, you will have to wait for it to be downloaded, but if it is small you will not even notice it.