Go to Settings > Apps > Default Apps and ensure Notepad is the default for .txt files.
Tools like PixoCraft allow you to type text and click a button to download it as a .txt file instantly. Download New Text Document txt
It is a common bug on Windows for the "Text Document" option to disappear from the right-click menu. You can often fix this by: Go to Settings > Apps > Default Apps