If you use Windows and can install PowerToys it has a great tool called "Text Extractor".
"Text Extractor enables you to copy text from anywhere on your screen, including inside images or videos."
More info: https://learn.microsoft.com/en-us/windows/powertoys/text-extractor