I'm assuming Lightroom Classic for this...
Synchronisation services are not backup services or offline storage services. Many people make the same mistake with such as iCloud.
A synchronisation service enables multiple devices to share the same data. Removing data from one device will remove it from all synchronised devices.
You can therefore only sync as much data as you have space for locally.
From Adobe - How does sync work in Lightroom Classic?
My desktop is running out of space if I turn on sync in Lightroom Classic. What should I do?
Lightroom Classic downloads original images from the cloud if sync is turned on. If you have a considerable number of images on the cloud, it may take space on your local hard disk.
Can I delete images from Lightroom Classic after syncing it with the cloud?
If you delete images from Lightroom Classic after syncing it with the cloud, the images will be deleted from the cloud as well.
For Lightroom [cloud version] then you can set local storage allocation in prefs - see Lightroom | Local Storage Preferences