Hi,
The first thing to do is try deleting preferences. To delete preferences open iMovie while holding down the Option and Command keys and select to delete preferences in the box that appears. iMovie will open in a new library. Reopen your old library to get back to your projects. Now see whether iMovie recognizes your Photos library. Possibly you may need to reboot to set the changes. Deleting preferences is a safe procedure that will not cause data loss or disruption to your project.
If still no luck, try the following:
Make sure that you external drive is formatted Mac OS Extended (Journaled) or APFS that is required to store a Photos app library. If you need to reformat be aware that reformatting erases all data on the drive, so move your Photos library, and any other data that you want to keep, off of the drive before reformatting it.
Make sure that your Photos library is set as your System Photos Library, because iMovie will only recognize the System Photos Library. Go to your Photos app General preferences and make sure that the words "Use as system photos library" are grayed out. If they are not grayed out, click on them to gray them out. That will designate your Photos library as the System Photos library.
Then, close iMovie. Open your Photos library and park it on the dock. Then open iMovie. That should trigger recognition.
-- Rich