Hello, kengofrom新宿区.
Welcome to Apple Support Communities.
It's my understanding that you're unable to sign in to iCloud because it's asking for a verification code. It sounds like you have Two-Factor Authentication turned on. Check out this article for help with verification codes:
Get a verification code and sign in with two-factor authentication
If you can’t receive a verification code on your trusted devices automatically, you can get one from Settings, even if your device is offline.
From your iPhone, iPad, or iPod touch:
In iOS 10.3 or later:
- Go to Settings > [your name].
- Tap Password & Security > Get Verification Code.
In iOS 10.3 or later, if your device is offline:
- Go to Settings > [your name].
- Tap Password & Security.
- A message says "Account Details Unavailable." Tap Get Verification Code.
In iOS 10.2 or earlier:
- Go to Settings > iCloud.
- Tap your Apple ID username.
- If your device is offline, tap Get Verification Code. If your device is online, tap Password & Security > Get Verification Code.
From your Mac:
- Go to Apple Menu > System Preferences > iCloud.
- Click Account Details.
- If your device is offline, click Get Verification Code. If your device is online, click Security > Get Verification Code.

If you can’t sign in, reset your password, or receive verification codes, you can request account recovery to regain access to your account. Account recovery might take a few days or longer, depending on the specific account information you can provide to verify your identity.
Do you have more than one trusted device? How many times have you tried to get the verification code?
Let me know and we'll go from there.
Thank you for using Apple Support Communities.
Cheers!