An Apple ID say example1@gmail.com is signed in Mac system preferences before following upcoming steps overwrite the iCloud Keychain verification code , if that is not in records ( as it will be further required ) iCloud security code - Apple Community
, to create an apple id say eample2@icloud.com see a thread sign out from secondary authentication ac… - Apple Community
in the screen shot posted in the thread click on create Apple ID , use mail address as example2@icloud.com with different password not same as your primary Apple ID account , in upcoming steps you will need security answers for respective questions , date of birth , rescue mail address and its password ( that must be in your records ) , once Apple ID using iCloud domain is established in Mac system preferences .
If iPhone / window computer were synced ( signed in with same Apple ID say example1@gmail.com and password on the same network ) with Mac , the new Apple ID say example2@icloud.com has to updated see the article What to do after you change your Apple ID or password - Apple Support