Stuff like this scares people away from linux. There are plenty of gui text editors for linux. Mousepad and leafpad are two that are equivalent to notepad but unlike notepad, they can be used to write code too.
“There are plenty of gui text editors for linux.”
I use Visual Code for editing on Linux, Mac, and Windows 10. Another good GUI editor is Notepad++. Both are free and support many languages.
Linux/unix editors predate modern GUI-based computer systems. They are there because at the time, it was all there was. Amazing, really, that all modern servers and even desktop machines, like Macs, are running Unix under the hood; an OS invented back in the 1960s. I guess it points to UNIX's rock solid simplicity that it is in use to this day.