It would help to know what this "nothing" is that you claim does not work.
This Apple article has instructions for what to do if you have forgotten your password —> If you forgot your Apple ID password - Apple Support
or go directly to this link —> http://iforgot.apple.com/
If you still need help:
Contact Apple for help with Apple ID account security "This article provides country-specific Apple Support contact information for customers seeking help with their Apple ID password or other security-related issues." —> Contact Apple for help with Apple ID account security - Apple Support
It sounds like you may be referring to a verification code that is being sent to another device. From: Get a verification code and sign in with two-factor authentication - Apple Support
A code is sent first to your trusted devices automatically:
"If you have a trusted device running iOS 9 and later, OS X El Capitan and later, iPadOS 13 and later, or watchOS 6 and later, the verification code is displayed automatically on your trusted devices."
If you don’t have a trusted device handy, you can choose to have a verification code sent to your trusted phone number as a text message or phone call.
1. Click "Didn't get a verification code" on the sign in screen.
2. Choose to have the code sent to your trusted phone number.
3. You'll get a text message or phone call from Apple with your verification code. This text message might include an additional domain validation line. This line includes the @ symbol, the website name, and your code (for example: @icloud.com #123456 %apple.com).
4. Enter the code on your other device to complete sign in.
"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."
On a mobile device go to Settings > [your name] > Tap Password & Security > Get Verification Code.
On a Mac: Go to Apple menu > System Preferences [System Settings], then click Apple ID. Click Password & Security > Get Verification Code.
If you find you can’t sign in, reset your password, or receive verification codes, you can request account recovery (read this support article: How to use account recovery when you can’t reset your Apple ID password - Apple Support ) 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.