The way it works is by adding the files to be used as templates to the XDG_TEMPLATES_DIR.

touch "~/Templates/Text File.txt"

This would create a new menu item on the right click menu shown by Nautilus. It would be under the "New Document", called "Text File", same as the name of the file we created earlier. Clicking it would create a file named "Untitled Text File.txt" and would automatically enter rename mode.

If there's no ~/Templates folder, look at ~/.config/user-dirs.dirs and set the value of XDG_TEMPLATES_DIR to where you want it.

It may require the current user to log off / log on, or run

$ xdg-user-dirs-gtk-update  # Run one of these two, not clear
$ xdg-user-dirs-update      # which is needed, or both.

Template file ideas