Hey there Senti,
Thanks for reaching out to Apple Support Communities. I understand you’re not able to open documents in iCloud Drive on your Mac. I’ll be happy to help.
Go to System Preferences > Apple ID > iCloud. Turn off iCloud Drive. Boot your Mac into safe mode after that:
Use safe mode to isolate issues with your Mac
Turn iCloud Drive back on and see if the issue returns. If it doesn’t start up your Mac as normal and test again.
If might also help to update your Mac if there are available updates and can further isolate this issue:
How to update the software on your Mac
Let me know if this helps.