With iOS 15 and later or iPadOS 15.1 and later, you can use Live Text to copy text in photos, translate languages, make a call, and more.
Use Live Text to get information from photos and images Live Text recognizes information within your photos and online images, so you can make a call, send an email, or look up directions with a tap. You can also use Live Text in the Camera app or when using Camera in apps like Notes or Reminders — point your camera at a photo or image with text, then tap the Live Text button
(Only works on supported = relatively new devices, AFAIK complete on-device)