Kind of a PSA in case anyone else has the same problem I was having: trying to register a Yubikey 5 NFC was giving unhandled server error messages and invalid key warnings, across several browsers, despite working on the Yubico demo page and the setup looking OK in the management app.
Realisation: the generated OTPs were starting ‘jj’ rather than ‘cc’ or ‘vv’.
Solution: switch keyboard layout from Dvorak to QWERTY and everything works fine.
I guess the demo page automatically translates based on keyboard layout.
Hope that saves someone some time