This is the genuine weakness of emailed sign-in codes, and it is worth stating plainly rather than discovering. The code proves you can read the address; if you cannot read it, there is no proof left.
A passkey is stored on your device and unlocked with a fingerprint or a PIN, so it works without the inbox. Setting one up takes about thirty seconds from Settings.
An account set up through an organisation can also have a recovery address added, which is the other route back.