I was logging on to a site where I had to receive a number by SMS. The "Message" app showed that there was one message unread but there was no message visible. I eventually found it in the archive although it had arrived ony a minute previously.
On Google Messages there is a swipe action option as shown in the attached image. If your not using Messages but some other app there may or may not be this option, but if so have you perhaps got this set to 'Archive' and you've swiped the notification away?
I am using Google Messages, with the speech-bubble icon, on a Samsung S7 phone. I thought the swipe options must be in the settings for Messages but I cannot find any swipe options. We must be looking at different versions.
Just to be sure -- you're certain that it was in the Archived section, and not the Spam & Blocked section? Those two options are right next to each other, so I could imagine accidentally tapping Spam & Blocked when you thought you were tapping Archived, and finding the message there.
Is the message adding on to an existing thread in the archive? Either way, try moving that message out of the archive, and see if subsequent 2-factor code messages from that source still go straight to the archive.
Thanks - the message is not part of a thread. I have unarchived it and will keep it until I access the source again.
Thanks very much for your help on this.