Do you mean front-end or back-end?
Full disclosure, I'm trying to transition into web design as a new career so take what I say with a grain of salt.
Coding is coding so I would focus on becoming comfortable with the fundamentals of programming more than diving into a specialization early on.
Programming is built upon science but like art, the best way to get better is simply by making apps or working on projects. Getting paid to do so is better, but there are plenty of people who have pet projects or work on Open Source projects for free to get experience coding.
I'm more of a front-end web developer so I can't speak too much on the intricacies of back-end programming. Back when I first learned to program, I wanted to program games but found my mind doesn't handle logic well enough to program the behaviors within a game. But I'm pretty good with interfaces and UX design so that's the direction I'm moving towards.
Learning concepts such as Object-oriented Programming (OOP) and Model-View-Presenter (MVP) and Agile development and User-Experience Design (UX) while building an app of your own is a good place to start.
A place like Coursera or Codecademy or Skillshare ought to have courses that will step you through the fundamentals while offering guidance.
If you're interested to learn more about the field, try and attend a programming Meetup in your local area. Some areas offer meetings for beginners. For as much as programming is a solitary endeavor, the Meetups offer chances to meet people that you can collaborate with and learn from. That will accelerate the pace of your learning. Informational interviews with friends or others who work in IT is may be helpful.
Programming is a lucrative field, and back-end programming more so. That being said, the question isn't if back-end or front-end is more lucrative, it's which field are you best suited for. So, if you aren't pulling in the salary of a full-stack programmer (a programmer who knows both front-end and back-end), you can still make a great living even as a UI designer.
Since you'll have to constantly refresh your knowledge and learn new technologies, it's best to find something you have a knack for and a willingness to learn more so than focusing solely on the highest paying field unless you just have a mind for programming. (in which case I just wasted your time with my basicness)
<--- Me when my head hits the pillow