When a Mac and other apple devices are signed in with same Apple ID and password on the same network , if you open system preferences > iCloud and uncheck the box of iCloud Drive a pop up window appears , showing to keep a copy of documents , and remove from the Mac .
( a ) if you had clicked on keep a copy , they will be archived in home folder that can be viewed by clicking on finder in the dock , take cursor on top menu bar > Go > Home > your user name > iCloud Drive ( Archive )
See these screen shots .


You can apply the same procedure from the second Mac also , when you delete the files from www.icloud.com they are moved to recently deleted folder , and are kept for 30 days on the iCloud server , as soon as the the time limit is crossed they can't be recovered unless and until you have set up time machine ( the files can be recovered ) .
( b ) if you had clicked on remove from this Mac the files will be deleted from the Mac ( in a condition when in both Mac the files are synced hundred percent and equal in number on both Mac , as when two Mac / devices are signed in with same Apple ID and password it takes time to sync each file that can be in great number ) .
See this article https://support.apple.com/en-us/HT206985
Note : when you delete files from iCloud.com that will be deleted from iCloud Drive also .
Regarding the storage space , It depends what storage you are using if it is free 5 GB storage or you have purchased from apple , not only documents and desktops or files store the space other applications like massive photos , notes , mails , calendars old backups also occupy the space .
As soon as the iCloud storage space exceeds the designated space an error will always show , you have to delete the data , use optimise feature see these articles https://support.apple.com/en-in/HT204247
https://support.apple.com/en-gb/guide/system-information/sysp4ee93ca4/mac
https://support.apple.com/en-in/HT201318 - this article is used according to the situations , when data is exceeding and you plan that more storage is to be added , purchase the icloud storage .