Tutorial: How to recover deleted files in Microsoft Teams or SharePoint?
Files that are deleted in Microsoft Teams or Office 365 are kept in the Recycle Bin for 30 days.
Delete a file in Microsoft Teams
Select the file you wish to delete - then right-click on delete.
Press open in SharePoint to restore the file.
Select -> Open in SharePoint to view the underlying library. In it, all deleted files are available for 30 days saved.
Restoring a file from the recycle bin in Microsoft Teams
Restoring files can only be done via SharePoint.
Select below left -> Recycle bin and then restore.
After this step, the file will be found again in the initial site as you can see in the image at the top.