You can do it - just start
The saying "If you think you can win, or if you think you cannot, you're right" has a lot of truth to it.
Staring at a computer screen with a daunting task ahead can feel overwhelming. You have to think about, code, fix, test, and refactor many things, some of which you might not know how to handle.
It's easy to feel defeated before you even start. How do you crop an image, find a memory leak, or implement a min-heap? You simply can't do that; it took you half a day last time to fix that stupid CSS layout bug.
And yet, you can. It sounds like a cheesy pep talk, but you can; the key is to start doing it.
It's like climbing a huge mountain when standing next to the sea. The peak is very far, and there are all kinds of obstacles in the way. And yet, as long as you put one foot after the other and follow the path, you'll eventually reach the top.
I'm not saying it's easy, or you can speed through it. Learning new things, taking detours, and overcoming challenges are all part of the journey.
A lot of times, you indeed can't do it with the knowledge you have at the start, but that's not a requirement, is it?
If you get stuck at some point and have to figure out how to move ahead, what's the harm? You learned something new that will stick amazingly well since you've used it to overcome a real problem. Heck, I still learn new things almost every time I work on something non-trivial.
Wouldn't being a developer be more tedious if you didn't have to think hard and learn new things every time?
Deadlines can add pressure, making it feel like there's no time to learn. That's when you can lean on the experience of senior developers (or seek advice on developer forums) who went through the same arduous but rewarding process in the past. (Sssh, they still need to do the same on several occasions; building software is far too complex for somebody to breeze through it).
Once you've started chipping away at the problem, you've built momentum, and it becomes harder to get desperate and stop. It feels great to do something, anything, that takes you closer to the solution.
Sure, there are all kinds of setbacks along the way that will make you feel frustrated, but that's part of the job. Remember, you're making progress. Even if a solution you attempt fails, it's progress - you can eliminate it and try something else.
As long as you're moving, the cold wind can't chill you to your bones. And you will eventually make it to the top and plant your flag.