https://support.apple.com/en-in/HT203783
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 mobile number 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 disable the account that appears in IMAP account then also waiting for approval from other device error is shown .
Please , post some screen shots ( hide your mail address ) , this thread is running from months , you or other having their same problems can create new threads , me and other members will try to solve it .
Post the version of iPhone / Macs .