There's the common quote that I hear people say "If you're the smartest person in the room, you're in the wrong room." If you always follow that, you'll always feel like you're the dumbest, and no one will ever learn anything that you know. There's some other problems with that quote such as if everyone followed that, we'd all be chasing each other from room to room and the smartest person on the planet would have some issues, but alas, that's not relevant.
Going and mentoring people, or finding a company where you didn't start in as the lowest rung, will help you a lot. When you stay in the company you started in, as long as you're there you will wonder if you are skilled, or if you just have domain knowledge that makes you look more skilled than someone who just joined. Mentoring and teaching will help you realize just how far you've come, and the people who you teach will look to you like you look to those people who make you feel dumb and not good enough. I don't mean that in a negative way, they will respect your skills and look to you for advice, just like the people you look to now.
As for having trouble making the same insights and connections, that's just per the territory. Perhaps you're a developer who is self taught, or went through a boot camp, and working in a place that gets pretty computer science level (ML, fancy math and algorithms, NLP, ect). These people have lots of experience in these things that you don't, and so they make the connections, and you can learn to get there but it will take a long time. It's useful stuff, but maybe switching to a less intense job for a bit will help on that. Or maybe they know more about the current industry you're in, someone making medical study tracking software will do better if they have conducted a study before for example.
Lastly just straight up be honest and maybe ask them how they made that insight. Tell them that you don't understand how they got from point A to point D, and you can see if there's some thought process you can learn from them, or if the difference is just a large amount of background knowledge.
Truly lastly though, I will also say that consuming alcohol often can really slow your brain down, and just in case this is relevant, consider looking into cutting back safely with your doctor's advice. My mind has doubled in sharpness and speed of making those kind of connections since I got sober almost 2 years ago and also gave up smoking. So also talk to your doctor and be sure there's nothing physical that is actually causing your mental thought processes to falter and sabotage your confidence.