That is called Live Text and was introduced in Mac OS 12 Monterey. It is available for any app that uses the standard libraries to display images so you will see it in other apps, too, like Safari.
https://www.macworld.com/article/351669/macos-monterey-how-t...