Opening, sharing, and managing OneDrive-stored documents directly within Teams
Hi Adam,
You can restore previous versions of the file that you accidentally replaced in Sharepoint. Version History is turned on by default in SharePoint, but if you don't see the Version History command, it may be turned off. Depending on how your admin has set up SharePoint, you may be able to turn on list or library versioning.
Please see this article with complete information on how you could proceed.