I suggest trying all of:
visual studio code
notepad++ (windows only)
The first three are available under very consumer-friendly licenses (MIT or GPL), sublime a whole lot less so but has a free trial that doesn't expire
They all have their flaws, the question is just what you care more about.
Vim and Emacs should also be mentioned, but they have very steep learning curves making them unsuitable for new programmers (they'll be very unproductive and confusing)
You'll need an interpreter (or compiler) for your language(s) as well. If you're on linux or mac you might already have them installed depending on language. For windows you'll need to visit the language's respective websites - for ruby you can get an installer at https://rubyinstaller.org/