Activate safe mode https://support.apple.com/en-us/HT201262
Open system preferences > click on Apple ID icon , again click on overview , an error will show update your Apple ID settings click on continue , enter your Apple ID and password , in the same way click on name , phone , email .
If you upgraded the Mac OS from previous version to Mac OS catalina , and in the previous version secondary account was activated , it's better switch with two factor authentication .
When Mac is in safe mode enter the updated password in appleid.apple.com and www.icloud.com
Note : when ever you change Apple ID or its password it has to be updated in Mac system preferences see the article https://support.apple.com/en-in/guide/mac-help/mchl3f671010/mac
Just an informative article for keychain , only read it https://support.apple.com/en-in/guide/mac-help/mh36817/mac
The keychain paragraph , deleting the keychain folder from user library > preferences has a draw back it will mismanage the .plist arranged in alphabetical order , and never to be applied by a Mac administrator , you are not apple support advisor and can set the plist once again alphabetically and resetting the iCloud Keychain will delete the stored password , so when ever pops appear for icloud keychain , an iPhone is used and signed in with same Apple ID and password that was in Mac and set from iPhone and Mac simultaneously