Hi:
Is it on an external drive?
If so, the external drive correctly set up for using with a photos library?
It must be formatted APFS or MacOS extended (journaled) (preferred for spinning drives)
It Must not be (or have been) used for time machine.
It must have the 'ignore ownership" checkbox ticked. (Particularly important if trying to share between machines)
It should not be on a memory stick, SD or similar.
It must also not be a network drive (a direct connection is required - eg USB or Thunderbolt).
File sharing services such as iCloud Drive, Drop box, Onedrive etc are not compatible with Photos libraries.
It stands to reason that if you want any sort of reasonable performance it should be a fast drive with a fast connection.
See
https://support.apple.com/en-gb/HT201517