Same general issue here across two Macs, one Intel, the other M2. The common denominator: Sonoma. What wound up working was to disable iCloud drive. One that was off, the Finder behaved properly. I could open an app and open a file, whereas before, I would never get the file dialog box and the app would behave as if I had never tried "File open" at all.
But I, too, could not originally login to iCloud at all. Don't know how that resolved itself, but once it did, and I wanted to use iCloud drive, in addition to an unusable Finder, I could not select "Data and Documents" to sync because the system informed me that I had "too many files, folders, nested folders" and some such nonsense that prevented it. Still don't know why it claims that, but after turning off iCloud drive, everything works as normal, including the iCloud services outside of iCloud drive.