If your Photos Library is not yet optimized, you can drag it to an external drive. The drive needs to be prepared as described here:
Move your Photos library to save space on your Mac - Apple Support
Double-click the library on the external drive to test it, then you can delete the library from your system drive and create a new, empty library on the internal drive. Make this library your iCloud Library and turn on "Optimize Mac Storage"-
This will create a backup of your current iCloud Photos. But later you will either have to import any new photos into both libraries or have to switch the iCloud sync occasionally to the second, full library on the external drive. If your library is very large, it is easier import any new photos to your archive than to switch between iCloud Libraries, because this will cause all photos to upload again to iCloud. Power Photos can move selected photos between libraries . It is a very versatile helper for Photos Libraries.