The recovery code lets you restore your end-to-end encrypted messages on a new device or after clearing browser storage.
Because your messages are encrypted and the key is stored only in your browser, insteady cannot help if you lose your key. The recovery code is your only way to make older messages readable again on a new device.
You can generate a new code under Settings - Encryption recovery code. Important: a new code invalidates the old one. Messages encrypted with the old code cannot be recovered after this.
If your keys are not found on a device, you will be asked for your recovery code when you open Messages. Enter it and click Restore keys.