And how is your SSD drive formatted? 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. The newest macOSs won't even allow a Library on a non-Mac formatted drive to open, since there is so much background activity dealing with the Photos database that opening opening the Library could damage it. See this:
Move your Photos library to save space on your Mac - Apple Support
If this is the problem, then one solution is to copy the Library to your internal drive, reformat the SSD and copy it back. Probably, since this has just happened and Sonoma hasn't let you use the Library, it will be OK.
If there's no room on your internal drive to do this, you may have to get another drive for the transfer. If you use iCloud, you could reformat your drive, create an new Library on it, and let Photos fill it from iCloud.
Let us know what you do and how it goes...