Hey OscarPerezR,
If you haven't already, take a moment to see if you're able to sign in with your Apple ID on the Apple ID website. This will verify you're using the correct password and help to isolate the issue. Here's the link to the Apple ID website, just in case: Manage your Apple ID
If your password works there, let's focus on your Mac. We'll start with safe mode. Starting to safe mode completes many tasks during startup and prevents certain software from loading. So this can let us know if a third-party app or process is causing this to happen. Here's a guide on safe mode, and how to start there: How to use safe mode on your Mac - Apple Support
Intel processor
1. Turn on or restart your Mac, then immediately press and hold the Shift key as your Mac starts up.
2. Release the key when you see the login window, then log in to your Mac.
3. You might be asked to log in again. On either the first or second login window, you should see ”Safe Boot” in the upper-right corner of the window.
After starting to safe mode, see if your Apple ID is accepted and can update the software. If so, do you use a VPN or other security software with your Mac? To exit safe mode, restart your Mac normally: Shut down or restart your Mac - Apple Support
Keep us posted.
Take care!