In short, choose the one you are most comfortable with, as long as it gets the job done.
The main purpose of a text editor is simply text writing and managing, however, some add-on feature may also be useful. The useful features a text editor can have code completion so the coder saves time by using what the editor suggests, and the text editor should also include text and error highliting to ease trouble-shooting, and ideally, a text editor can also provide additional extensions to make certain tasks easier.
It’s worth pointing out that although Windows, Mac OS, and Linux all have their own built-in text editors, the functions are rather limited. So for a coder who requires more comprehensive functionalities, a 3rd party text editor is recommended.
A text editor only edits text, but an IDE is a software development package that has the capabilities beyond text editing, including managing, compling, and debugging.
How to be a proficient Linux user?