Realizing you may not know something isn't a bad thing, it's a step to understanding. The people who think they know it all regardless of the evidence presented are the problem ones.
We all are. Even the tech lead at the top of your program is only good at what they're good at (bad attempt at humor removed) Nobody knows everything and most of us are just googling stackoverflow like you are.
Rhetoric like this discourages women from becoming engineers, saying that a female tech lead isn't even a possibility is pretty sexist. For the record, if you had just said "he" without the sassy parenthetical I wouldn't have batted an eye.
*Now that I think about it, pretty sexist is an understatement, it's just plain sexist. Female tech leads exist, look it up, and stop perpetuating sexist ideas in tech
I have 20 years experience, just cracked a project I've been working on for almost three years, and I still hesitate to consider myself an expert.
Now, I'll tell any lay person who will listen that I'm an expert, but man, some days I just feel clueless.
I find the biggest issue I run into is lack of a peer group. I work in a large IS department, but other than one guy at my last company who works with a different language, I have no one to talk shop with.
Once one gets to a high level of expertise, it seems there are fewer peers around - people who can teach something new, or give a perspective not already explored.
It all depends on where you work, and whether there are any user groups frequented by veterans.
When you're a beginner, it's both. The further you get into your career, it's usually imposter syndrome. Then again the more you know, the more you realize you don't know.
Talk to colleagues about it. I didn't and the stress ate my soul until I had to take a mental health break. Most of the time you are not more of an idiot than they are and they have things to say about you that make them feel insufficient.
Some are just idiots though, but they often feel too confident to realize.
Even when you finally think you understand how something works, it's only temporary. Give it enough time and you'll look back at mysterious code you wrote years ago and think "Wow, they sure knew what they were doing!"