I've been wanting to learn to code for years and while I've been able to pick up skills and information here and there, I've never truly dived into it. For me (and maybe for others!), I often feel like I start off well and then I hit a wall, where I finally give up and send less time learning. The only way through, however, is to just keep trying!
When you get stuck on a problem, don't give up. Instead, remember that you're definitely not the first person this has ever happened to. Use the internet! Others have likely run into the same problem and, hopefully, shared their experience online - so take advantage of that.
The biggest thing I've learned from computers is to just go one step at a time. Don't assume you need to know everything from the get-go. Instead, just like in a programming language, look at the task in front of you, complete it, and then move on to the next until you get to where you're going.