The codes are either displayed or sent to you when you enable this security feature.
Here is an example how the recovery codes look like, that would have been displayed when enabling the 2-Step Verification for a mobile device:
If you have lost access to your primary method of verification, or are having trouble generating a valid code, we recommend temporarily disabling the security feature with the help of your recovery codes.
You can then set it up again to receive another set of codes.
We also offer the option to add a mobile phone number to your Ubisoft account, so you can receive a text message with a recovery code if you have enabled the 2-Step on your mobile device.
If you have not recorded the codes provided when setting up 2-Step Verification on your mobile device or email, you can reach out to us for help with disabling the feature.
Adding trusted devices can also help in making that process easier!