For MSTeams:
Go to channel files page and click 'open in sharepoint'
For Sharepoint and teams
Once in sharepoint, select the document in question (dot to the left of the file)
Click the three dots next to the items
Select version history
Click the date of the relevant option and choose 'restore'