Most writers and other creatives struggle with something known as the inner critic. It’s that voice in your head that’s telling you how bad you are, and that everything you produce is far below any standards.
Writers are trying to get rid of the voice but the inner critic won’t ever let you go. It’s always going to be in your head and it’s going to whisper things into your ear.
You, as a writer, must learn not to take that voice personally, just as you don’t take personally any internet troll. That’s what it is – a troll. It doesn’t have better things to do.
What you need to do is make it busy. Give it things to think about. Let it solve your story problem. Turn it into a character of your book. Let it criticize imaginary people from your stories. Keep it busy. Use it as a tool. Turn the things around. Make it work for you instead of against you. Be the boss.