To enable Live Text on your iPhone, go to:

Settings > General > Language & Region, and toggle the switch next to Live Text to the on (green) position.

Once enabled, you can copy, translate, and share text directly from your Camera app and Photos app

*Note: Live Text requires iOS 15 or later