apple id issue on mac
So i had created an apple id and made it in icloud.com instead of gmail.com and now my mac keeps asking me the password for that apple id which has icloud.com .I have another apple id which is valid and wanted to know how to change the apple id which is in icloud.com to my new one . And also i cannot sign out from my apple id from my mac because it asks for the password which then shows as apple id is invalid .
MacBook Air 13″, macOS 11.7