When you need to start from scratch with your Yubikey a factory reset is the solution.

To manage Yubikey you can download Yubikey manager. When you installed the software it will find your attached Yubikey device. From here you can manage and see all information about your Yubikey.

In my case I have done a FIDO2 configuration to sign-in to Azure AD in my lab. Now I need to reset my YubiKey to be able create a new FIDO2 login to a different account i Azure AD.

I start the Yubikey manager and select application > FIDO2 > Reset FIDO. After you select reset FIDO you will need to detach and attach the FIDO appliance to you device, remember to touch the Yubikey when you attach it again. There will be no PIN left for the FIDO. You can now set a new PIN to the Yubikey.

Now I can go into my security info and register the Yubikey for the user account. Make sure you have activated the authentication methods to enable security key in Azure AD for the user.