You can do this with Shortcuts if you're familiar with creating those. There's a 'Generate QR Code' action you can use. Have the shortcut accept text as input, pass the input into the 'Generate QR Code' action, and do whatever else you want it to do (save it, send it, etc). Then set the shortcut to show in the Share Sheet. Now you can select the text in the image (or anywhere else) -> Share... -> select your shortcut to create the QR code.
To be even fancier... You could use the 'Extract Text from Image' action. Pass the image into the shortcut, extract the text, parse it out if needed, and run it through the 'Generate QR Code' action.