I originally wrote this as a reply to a Reddit post but as I saved it, comments were blocked.
Give yourself little tasks and projects to do. Think of it as being like model kit building. You start with the easy kits like a plane with just a few pieces and as you get better you pick up new things like painting, sanding, and eventually making bigger better kits.
So, start with small things. For example, write a small program with a for-loop and get to know what all if the commands are really doing. This is your basic kit. Add in some variables. Add in user input, and keep going trying new things. Eventually, challenge yourself by learning how to work with a GUI. Sometimes your program will break. This isn’t a bad thing. It teaches you how to debug. What’s important is to take your time and experiment.