Can you provide a little bit of context? What were you trying to do when you were asked to enter verification codes?
Is this for a new Apple ID account? Or did you change your Apple ID?
Are you trying to subscribe, or are you already subscribed?
Signing in on new devices will often require a verification code for two-factor authentication. This helps protect the account (and payment method associated with it) against unauthorized use. It should be a one time thing (unless you reset).
Apple ID accounts who two-factor authentication will have trusted Apple devices or phone numbers associated with it, to receive the verification codes on.