iCloud & iCloud Photos · Online-only files and Optimize Mac Storage
Can I set a limit on how much of my Mac's space iCloud Drive uses?
Short answer: No — macOS has no cap for iCloud Drive's local space; Optimize Mac Storage decides when to free files, usually when the disk gets full. Use Remove Download and Keep Downloaded per folder; Storage Studio can also help free iCloud files.
Not with a number. macOS has no setting to cap iCloud Drive's local space; Optimize Mac Storage decides on its own when to make files online-only, usually only once the disk is getting full.
You can steer it: choose Remove Download on folders you don't need locally, and Keep Downloaded on the ones you do. Storage Studio can also help free iCloud files on your Mac — see making iCloud files online-only and how much space iCloud uses on your Mac.