Files could disappear as a matter of backup software that has been moved to iCloud or OneDrive. If you have a large iCloud account, and select Documents, Desktop or user folders to be put in iCloud, At which time, the documents that were local on your computer would no longer be there, but would still be visible as subfolders of iCloud on the left hand side of a Finder window. OneDrive has similar syncing functionality, though I can't say for certain if it would do such stuff.
The upside of putting Documents in the cloud of your AppleID account, is that all iDevices linked to that AppleID account can see the documents in the cloud. The downside, the larger the document folder size, the longer the synchronization process is. Temporary documents may be put in your hard drive's root folder relevant to iCloud, OneDrive, or even Time Machine backup, but only while the synchronizing is taking place or is paused. If you pause it because of lack of connection, it may take time before it actually reappears on your desktop. You can Option-drag files out of the iCloud folders and copy them to your local User folder ensuring you follow the path structure on the left sidebar of your Finder window. The Desktop when it is backed up though will remain empty, and will only be apparent under the iCloud folder.
Apple menu -> System preferences -> iCloud or AppleID lets you have greater control over what's backed up otherwise to iCloud. This varies depending on Mac OS version. iCloud Drive preferences on Monterey under AppleID -> iCloud lets you select Desktop and Documents folder. If that is selected, that's the source of your problem.