If your library is currently on iCloud Drive it will also be on your computer.
macOS Sonoma refuses to upload a Photos Library to iCloud Drive but is keeping it local. I am seeing a crossed out cloud badge for the any Photos Library on iCloud Drive.
Please check the cloud status of the Photos Library - when you open the folder with the library in the Finder in list View and enter ⌘J you can enable the Cloud Status to show, Is there a crossed out cloud?
Then you can just move the library to the Pictures folder, as it will not have been uploaded and will not need any extra storage, when you move it back.
For example:
