Whether you directly open TextEdit and edit it? If you did that, of course, you couldn't save the TextEdit as a plain .txt file.
TextEdit usually opens as a rich text by default. If you want to save it as a plain .txt file, you need to click the Format option on the menu bar and choose Make Plain Text.
If you find that the Make Plain Text button is not working or you still can't save as plain .txt file after you select Make Plain Text, try to relaunch TextEdit or follow the solutions in this post: TextEdit is not working, what to do?