Please see my answer here: https://apple.stackexchange.com/a/360783/45492. There I quote a Support article, however, the list is not rendered correctly in the quotation (see 1. below). I tried adding spaces and paragraphs to no avail. Am I doing something wrong?
Reset using your Recovery Key (FileVault must be on)
If FileVault is turned on and you have a FileVault [Recovery Key], you can use that key to reset your password.
1 .At the login screen, keep entering a password until you see a message saying that you can reset your password using your Recovery Key. If you don't see the message after three attempts, FileVault isn't on.
Click > next to the message. The password field changes to a Recovery Key field.
Enter your Recovery Key. Use uppercase characters, and include the hyphens.