A lot of people try to learn programming trough reading a book from cover to cover, attending boot camps or watching endless tutorials.
This approach can help you to get some knowledge, but most of the time you learn way less as you have hoped.
If you really want to learn to code, there is only one right way to do it:
Find or create a real project, you can work on!
Why is this approach to learning programming a lot better?
In contrast to tutorials or programming books, you will get at some time to a point where you have to find a solution for a problem you can't solve yet.
To get ahead with your project, you have to find a solution to this problem.
Now, you're in a situation where you will learn more about programming and problem solving as if you read through 100 books or watching random tutorials.
You work with your code and you search for solutions to a real problem.
Everything you have truly learned in your lifetime, you only have learned because you did it.
Reading through a book or watching random tutorials without directly using the information bring you some information about the topic but you learn nothing.
It's like watching someone is riding a bike.
You may know how to do it: Step into the pedals and not falling off.
But you don't know how to do it and why it's correct in this or a different way.
Thanks for reading.