OneDrive keeps deleted files in several places, and which one holds your file depends on how it was deleted and how long ago. A file removed in File Explorer goes to the local Recycle Bin and to the cloud recycle bin. A file deleted from the OneDrive website skips the local bin. A file overwritten with wrong content is not deleted at all, and needs version history instead. Work through the options in the order below; most recoveries succeed at step one.
Shift + Delete and a delete performed by an application can bypass the local bin but still reach the cloud recycle bin.
Step 1. If files are disappearing right now, pause syncing before doing anything else. Right-click the OneDrive cloud icon in the notification area, open Settings, and choose Pause syncing.
Step 2. If you are on a PC that shows files missing while another device still has them, do not let that device sync. A sync from the device that still holds the data can restore them; a sync from the emptied device propagates the deletion.
Step 3. Do not create new files with the same names in the same folders while you are deciding. They can overwrite the space the recovery depends on.
Step 1. Check the local Recycle Bin first. Open it, find the item, right-click, and choose Restore. This is the fastest path when the file was deleted on this PC.
Step 2. If it is not there, sign in at onedrive.com in a browser and open Recycle bin in the left navigation pane.
Step 3. Select the file or folder and choose Restore. Restored items return to their original location.
Step 4. If the item was in a shared folder, the owner's recycle bin may hold it instead of yours. Ask the owner to check.
Step 1. For a file that was overwritten rather than deleted, right-click it in File Explorer and choose Version history. Pick an earlier version and restore it. This works for Office documents and most common file types.
Step 2. For a mass deletion or an encryption incident, open OneDrive settings in the browser, go to Restore your OneDrive, pick a date within the last 30 days, and restore. Review the activity summary before confirming, because this rolls back everything, including changes you want to keep.
Step 3. If the file was in a SharePoint or Teams library, use that library's own recycle bin and version history. Those retention periods are usually longer than personal OneDrive.
Once the retention period passes, no Microsoft tool will bring the file back. At that point your options are limited to what remains on the local disk.
Turn on Files On-Demand only for files you can re-download, keep a second copy of irreplaceable documents outside OneDrive, and confirm the retention period of your account type before you rely on the recycle bin.