Additionally to what Yer_Man said-- you can't run a Photos Library from the iCloud Drive. And you can't run the Library from a network or cloud drive.
The Photos Library should be in your user's Pictures folder or on a properly Mac formatted drive connected by cable to your Mac. To avoid damaging the Photos Library an external drive must be formatted in either APFS format or Mac OS Extended (Journaled) format. Additionally, the drive can not have had Time Machine on it since it was formatted. There have been so many problems with using incompatible drives that the newest macOSs won't even allow a Library on a non-Mac formatted drive to open, since there is a chance of damaging the Photos database. See this:
Move your Photos library to save space on your Mac - Apple Support
When people talk about using iCloud Photos, they are meaning that they are using an app that is located at iCloud.com, and this is different from the iCloud Drive. At iCloud.com you can see the Drive for storing documents, and you can also see a number of apps including Photos. When using iCloud Photos, the Library at iCloud Photos is kept with the same pictures as the local Library on your Mac.