Hi Apyas,
Welcome to the Apple Community.
Wondering which Mac model you are using,
and
which Mac OS version is installed
and
what happened when you restarted your Mac, and tried signing in again ?
Eg: Click the Apple icon at top left in tany Mac Window, and choose "Restart" from the drop-down menu.
Wait for your Mac to restart and display the Log-In screen, then sign in again with your password.
Sign in to iCloud
___________________________
If you haven't used iCloud before:
You need an Apple ID account to sign in and use iCloud
How to create your Apple ID if you do not have one::
https://support.apple.com/en-au/HT204316/
____________________________________________________
What to do:
"If you can't connect or sign in to iCloud"
https://support.apple.com/en-us/HT203512
Access and manage files in your iCloud Drive:
https://support.apple.com/en-au/HT201104
All the best :-)