How to recover a Word document mangled with TextEdit
TextEdit makes versions of files, so you should try that first using the File menu in the app.


File -> Revert To -> 


If that fails, then go to your TimeMachine backup or other backup of that file.

Worst case, use spotlight to search for other copies of that file if you don't use either of the native backup options for reverting file changes on macOS.