Hello jean-pierre160,
I understand you're receiving two verification codes in one session. I am happy to help.
With two-factor authentication, you’ll need a verification code to sign in with your Apple ID on a new device or browser so this is why you get the code.
Get a verification code and sign in with two-factor authentication
If you're receiving two codes and you only requested it once then I would recommend checking out the article below about a compromised Apple ID.
If you think your Apple ID has been compromised
Let us know if that resolves this issue for you.
Thanks for using the Apple Support Communities.
Take care.