In Shortcuts, how to find a specific photo?
Individual photos can be selected by their (file)names. But without the dot part.
So: Name is IMG_123
The letter case must also match!
The following will not match the photo named IMG_123.JPG:

IMG_123.JPG
img_123.jpg
img_123

To find out the filename of a photo in the Photos app:

open the photo
tap the action/sharing icon: 
in the menu select Save to Files

The file name will be shown at the top, next to the file icon. No need to actually save the file.
PS: There does not seem to be a way to filter by photo caption.