It took me some twenty-plus years to really learn how to program. It wasn’t for a lack of trying either, it was just that I was trying the wrong way. I tried to learn to program by following tutorials that created programs I didn’t have the slightest interest in keeping. I was trying to learn for the sake of learning.
Now I’m sure that works for some people. Intellectually curious for the sake of it. I envy you. But that’s not how it worked for me and I know that’s not how it works for a lot of other people.
What made it click for me was programming in anger. Programming because I needed to. Programming because I gave a damn about what I was writing and I wanted it done sooner rather than later.