Programming is hard. You're going to run across new things often. You are always going to be learning. And things change quickly as well.
So all programmers feel this way.
If you're been doing it professionally for a year you have the knack. You can figure things out and are a fast learner.
When you feel this way at work think about all the things you know and can do.
Then take a break after work, go for a walk or hike, appreciate what you have.
Then research the task that's giving you this feeling, learn about it, understand it, grow your knowledge.
Programming is about learning, trying new things. There is usually one task per week where I'm like I'm not sure about this. You just have to do it, test out ideas, find the solution.
Luckily in our industry trying new things is relatively safe and controlled in your local env. You can try new things and even break things finding a solution.
Just be glad we're not in construction with razor thin profits where you're expected to pay for every mistake you make.
Software is hard, you are doing a great job, focus, breath, take in the big picture, then carry on.