A photo library must not be stored on iCloud Drive. The syncing will damage the library. You can neither put an iPhoto Library nor a Photos Library on iCloud Drive.
And if you have an iPhoto Library and a Photos Library on the same drive, moving the iPhoto Library somewhere else will not free much storage, as both libraries are sharing the storage for identical photos in both libraries with hard links. And moving the library somewhere else will break the hard links. After that the libraries will need twice as much storage together as they can no longer share the storage. The local copy of the iPhoto Library on your iCloud Drive will now use additional 30GB. If you still have an iPhoto Library in addition to your Photos Library move the iPhoto Library to an external volume to archive it. Move your Photos library to save space on your Mac - Apple Support
To store your photos in iCloud and to save storage at the same time, open Photos, then enable iCloud in the Preferences: Photos > Preferences > iCloud: Set the checkmark for iCloud Photos, and also "Optimize Mac Storage". Then Photos will manage the storage for your photos to save storage, if you are low on storage.
You may need to enable the "Photos > Preferences > General: Use as System Photos Library", before you can enable iCloud Photos. The button "use as System Photos Library" should be greyed out to show that the library is already your System Photos Library. If not, click it.
Or are you still using iPhoto and Photos? After upgrading to Monterey you can no longer use iPhoto at all. You have first to migrate any iPhoto Library you are still having to Photos for Mac, or you will not be able to access your photos. Migrating your iPhoto Libraries to Photos should be done, while you are still having a system version installed, where you can run iPhoto and the iPhoto Library upgrader tool (iPhoto '11: About the Library Upgrader).