If you’re using macOS Monterey, you can access Live Text in Preview and Safari. It means you can copy and use the text in an image. Just position the pointer over the text you want to copy and then drag it to select it. There are also OCR (Optical Character Recognition) apps like Prizmo and TextSniper, which you can check out.