There's no built-in feature for creating Text files from the context menu on Mac. If you want to right-click on empty space to create a new Text file on Mac, you need a context menu enhancer.
Try iBoysoft MagicMenu! This tool can add a function called "New File" to your context menu, allowing you to create files of various formats, including .txt, .rtf, .doc, .xls, .plist, .py, and more with right-clicking.
Besides, you can also add "Create New Text File" to the Services folder using Automator. This will enable you to create a new Text file in Finder by opening Service > Create New Text File from the top-left menu bar.
Check out this guide for more details: How to Create a New File (TXT) or Document (DOC) on Mac/MacBook?