Sometimes I come back home from work, stuck on something, no adults to ask help to and a deadline in the morning.
I fall asleep thinking: “Tomorrow is the day I'll get caught. This will be the one problem I won't be able to solve. The rest of my life is going to be misery and failure”
Every morning though, with more or less pain things get sorted.
Anyways here's what you should do when you're stuck:
Define what you're trying to do - and explain why the outcome you're getting is wrong
Check what are your assumptions - There might be something wrong in your thinking (or your code)
If you found an answer congrats! If you haven't move to the next step
Split the problem in independent assumptions and go back to 1. with each assumption
That's it. The important thing is that you move fast through these steps and that your questions keep getting more specific.
If you're asking the same question more than once you're doing something wrong