The Mac should be updated and upgraded with latest version , same with iPhone / iPad , regarding only apple inbuilt apps , the older Apple ID is is still being used , sign out Apple ID from Mac system preferences and again sign in with same Apple ID and password , you must knew iCloud Keychain verification code .
Note : when keychain box is not checked there is some issue with it .
If iCloud Keychain is corrupted in Mac .
( a ) Use an iPhone and sign in with same Apple ID and password in your Mac .
( b ) In iPhone go to settings , iCloud open keychain and click on advanced two options will be shown reset code and reset iCloud Keychain , click on reset iCloud Keychain .
( c ) A verification code will appear on your iphone through sms and it will prompt to generate a code , think of code and fill up in the field so keychain will be set up in iPhone , write down this code .
( d ) Come to Mac , in system preferences > click on iCloud the box of keychain is unchecked , so tap the keychain box , it will show waiting for approval click on option button , enter the passcode that is generated in iPhone , click on confirm .
( e ) Again in iPhone a pop up will appear showing approve or deny for name of Mac to approve for keychain , click on allow .
( f ) In Mac click on option button enter trusted number an sms will come having a verification code , enter it the trusted number will be saved and visible and finally keychain is set in Mac .
Note : ( a ) clarify are you trying to sign in with same Apple ID and password on iPhone / Mac .
( b ) is there any iCloud Keychain issues .
( c ) when secondary authentication is used and you enable 2FA and before 14 days you click on the link recieved in IMAP account , then also waiting for approval from other device error is shown .