There are some possible solutions you can try to recover disappeared photos from external hard drives, including restoring deleted photos on iCloud, unhiding files on the external hard drive, repairing faulty external hard drives, and recovering lost photos from an external hard drive with data recovery software.
When you delete photos on iCloud.com, they are moved to the Recently deleted album, where you can restore those deleted photos. Therefore you can log into your iCloud account to check whether the deleted photos are available there. If so, you can select the photos you want and click the Recover button to recover iCloud Photos on Mac.
But if you have permanently removed the photos from the Recently deleted album manually or automatically if the remove after 30 days feature is turned on, you should try other solutions to recover files disappeared from external hard drives on Mac, including