Hey there parlem1,
Thanks for reaching out to the Apple Support Communities.
To get started, what happens when you try and open a .txt file in TextEdit? For example, do you see any particular alerts or error messages?
Since you started having issues with opening .txt files, have you attempted to restart your Mac? If not, since that can often help with resolving some unexpected issues, give that a try with the steps shown here: Shut down or restart your Mac - Apple Support
Restart your Mac
* On your Mac, choose Apple menu
> Restart.
If you don’t want app windows that are open to reopen when your Mac restarts, deselect “Reopen windows when logging back in.”
If the issue persists after restarting your MacBook, we'd also recommend testing the issue in safe mode. This can help to determine if the issue may be caused by some software that has loaded when you started your MacBook.
For steps on how to boot into safe mode, and what to do if the issue does or doesn't occur in safe mode, check out this link here: How to use safe mode on your Mac - Apple Support
Keep us updated on the results.
Have a great day!