This is the new "visual lookup" introduced by Photos 7 on Monterey. It is not yet available in all countries, so I cannot test it.
macOS Monterey - New Features - Apple
Visual Look Up
Swipe up or click the information button on any photo to highlight recognized objects and scenes. Learn more about popular art and landmarks around the world, plants and flowers out in nature, books, and breeds of pets.
According to the user guide, the overlay will only be shown, if the Info panel is open. Learn more about a photo using Visual Look Up in Photos on Mac - Apple Support
Live Text in photos
Text is now completely interactive in all your photos, so you can use functions like copy and paste, lookup, and translate. Live Text works in Photos, Screenshot, Quick Look, and Safari.8