Hopefully, the way that I would try to do it on my Android phablet ...
If the Messages app is already/still open from reading the first text,
the area to the left of the Home button contains a 'soft' button to
display all the apps currently running in a similar manner to <Alt-Tab>
in Windows. You can select the Messages app from there and read and/or
copy the code. Then you can use the same button to switch back to the
browser to enter it. Even if you closed down the Messages app after
reading the first SMS, you should be able to press the Home button,
relaunch Messages, and then use the above method to get back to the
browser in the same state that you left it.
--
Fake news kills!
I may be contacted via the contact address given on my website:
www.macfh.co.uk