Step1: Go to the OneDrive website. (Make sure you’re signed in with the correct account.)
Step2: If you’re signed in with a work or school account, select Settings > Restore your OneDrive.
Note: The Restore your OneDrive option isn’t available in the classic experience of OneDrive for work or school or without an Microsoft 365 subscription.
Step3: On the Restore page, select a date from the dropdown list, such as Yesterday, or you can select Custom date and time. If you’re restoring your files after automatic ransomware detection, a suggested restore date will be filled in for you
Step4: Use the activity chart and activity feed to review the recent activities that you want to undo.
Step5: If you’re selecting a custom date and time, select the earliest activity that you want to undo. When you select an activity, all other activities that occurred after that are selected automatically.
Step6: When you’re ready to restore your One Drive, click Restore to undo all the activities you selected.