Hello boaster_11,
It sounds like you are having an issue with entering your iCloud password in System Preferences on your Mac. To help isolate this, use safe mode to start up your Mac as it does the following things:
- Verifies your startup disk and attempts to repair directory issues, if needed
- Loads only required kernel extensions
- Prevents Startup Items and Login Items from opening automatically
- Disables user-installed fonts
- Deletes font caches, kernel cache, and other system cache files
Log in to your user account and test the issue while in safe mode and then restart normally and test the issue again.
How to use safe mode on your Mac - Apple Support
If the iCloud connection is still not working and you can't re-enter your password, completely remove the account from the device then sign back into it.
1. Choose Apple menu > System Settings.
2. Click your name.
3. Click Sign Out.
4. If you want to a keep a copy of your iCloud data on your Mac before you sign out, make sure that you select the appropriate checkboxes. Then click Keep a Copy.
5. If you want to keep a copy of your Safari passwords on your Mac, click Keep on This Mac.
Sign out of iCloud on your iPhone, iPad, iPod touch, Apple TV, or Mac
Once the account is removed go ahead and re-enter your Apple ID email address and password to sign back in and reconnect with iCloud.
Cheers!