Unlike programmers who work on day jobs, freelancers cannot choose their programming stack or skills they work on. Depending on market demand and supply, they need to keep evolving and changing as per the needs of dynamic freelance markets. First it was jquery and backbone, then came angular, then react, tomorrow it could be something else.
Not just that, but each project that lands on your desk could have a varying degree of complexity. There could be REST API and JWT authentication involved, there could be hard-core and mind-numbing regular expressions or statistical analyses, it could be anything. And chances are that at least one or more of them isn't your current high skill, what are you going to do in that situation? You can say no to the project, of course, but if you keep rejecting projects for such criterion, then you'll be left with very little work on your desk and you won't be able to pay your bills. Also don't forget that competition has reached the cutthroat levels in our field, chances are there are people sitting in China, India, Bangladesh or Ukraine who will do that project for peanuts!
So, what you need here is an approach that doesn't require you to be a master of everything from start. Programmers are stuck in a learning paralysis these days. They spend an insane amount of time watching programming videos on Youtube, scavenging through official docs and support forums, etc. and still feel that they lack enough knowledge to handle a particular skill or project. Part of the problem could be blamed on Impostor Syndrome. Many of us are so afraid of acknowledging that we know something, we go the point of feeling fraudulent of ourselves if we did that.
The thing is that a lot of developers are skilled enough to handle a programming project, though they may sometimes have confidence problems to answer quizzes, exams or even interviews through rote memory. But what they are forgetting is that they don't need to be the master of everything all the time. Learn and practice those skills one at a time as you get to work on them and you'll be good. This is what I call JIT (or Just-in-time) learning (its similar to how some contemporary programming environments like Java and .NET work).
Of course, you need to have some core skills like HTML/CSS/Bootstrap (for front-end engineers) or Python/PHP/Flask/Django (for back-end engineers) and you should keep brushing them up from time to time. But as far as rest of the "side skills" are concerned (like regular expressions, statistical libraries, third-party APIs & libraries, etc), they can be learnt and handled as and when they come up.
In fact, the most important and prominent part in programming is the practical part and not the theory part. Even if you did manage to turn yourself into a programming encyclopedia (by watching Youtube or whatever), there is no guarantee that you can apply those skills without any problems. Ask any adept programmer and they'll tell you that about 90% of the time, they are actually writing code, not learning a skill or watching a video.
So, in order to break the impostor syndrome pattern, you need to stop "thinking" about programming and simply jump into it! The more you write code and make it work, the more confidence you'll gain which'll automatically motivate you to write even more code and do whatever is required for that (like reading official docs for that particular programming language or framework).