Making an editor is anice endeavor. But there are plenty of, which are extremely well developed, open source, in many directions, emacs and vim the most prominent. But many others out there.
For open source GUI text editors there sadly aren't many that match the feature and polish of vscode.
You are right that VS Code has a "nicer" out of the box UX (this is subjective of course), but Emacs offers a malleable environment. In VS Code, you are limited to what the APIs the developers decided to expose. If you want a specific behavior that isn't supported, you either fork the editor or create a feature request ticket and wait for someone to prioritize it. In Emacs, because you have full access to the internal runtime, you can implement that feature yourself in a couple of lines of Lisp.