When you delete a Microsoft 365 user, their account is in a deleted state and recoverable for a period of about 30 days. OneDrive data is kept for 93 days after deletion, so it's possible to recover this data within that time frame.
Here is the Microsoft support article that discuss the process of recovering. It works, as we had to do this for a client.
Restore a deleted OneDrive
https://docs.microsoft.com/en-us/onedrive/restore-deleted-onedrive