Ever read or heard about the 10,000 hour rule? Programming like any other skill benefits from this rule. The more you write code, the more problems you solve and the more bugs you fix the more you become an experienced programmer. Consistently is key to become a good developer especially in the early stages of your career.
That is not to say you should spend countless hours a day behind a computer screen. That's not healthy. It is important to find a balance between programming and other hobbies or you will suffer a burnout. The emphasis is on consistency. You can decided to code for 5 hours a day with 10-15 mins breaks every hour or two. Take the breaks to stretch or walk around if you can. As you code consistently your brain continuously absorbs the concepts you learn due to the repetition. With time the things you do become pretty familiar and you enjoy coding more.
If you're a beginner this may be hard to maintain but you can start with as little as 1 hour a day. It would be even better if you coded the same time everyday to create a habit. Happy coding ๐