This usually happens because your Mac is trying to decrypt your saved passwords and iCloud data using an old security key from a past password. It gets stuck in a loop even when you enter the right info.
Here are a few quick things that usually fix it:
First, try toggling your keychain. Go to System Settings, click your name at the top, select iCloud, and go into Passwords and Keychain. Turn it off, wait about ten seconds, and turn it back on. It should ask for your current password and clear the notification.
If you have an iPhone or iPad logged into the same Apple ID, check if a notification pops up on that device asking you to approve the Mac. Approving it from your phone usually bypasses the old password prompt entirely.
If that still does not work, try changing your Mac login password to something temporary under System Settings, then Users and Groups. Once changed, click the update settings prompt again and enter the new password. After it goes through, you can change your Mac password back to what it was.
As a last resort, sign out of your Apple ID at the bottom of the main System Settings page, restart your Mac, and sign back in. That forces a clean reset and breaks the glitch.