When the impostor syndrome kicks in, the first thing that comes to my mind is how terrible I am at my job. It is only a matter of time before I get caught. I'm a fraud. The work is too easy, and anyone can do it. I'll get replaced by a junior developer.
The syndrome occurs every time I have to explain to someone else what I do. The more I talk about my work, the less special I feel about myself. Yet, the person I am talking to seems amazed by it. The more we know about a subject, the more we downplay its importance.
Here is an expression that used to sound obvious to me: It's as easy as walking and chewing. What this implies is that walking is easy. Chewing is also easy. Walking and chewing at the same time require no effort. But then, I watched my two sons learning how to walk. Their little feet wobbled. They fell on their buns. They fell on their faces. When they managed to stand up, the littlest breeze or sound will knock them back down.
Walking and Chewing is easy when you have mastered both over a long period of time.
Now the question is, how do you master anything to the point that it becomes second nature. The answer to that is that you have to practice it every day. When you go outside, you rarely see any able person struggling to walk. It's because they walk every day. You don't see anyone sitting in a restaurant and fighting to chew their meal. They eat every day.
When I find myself typing code and ignoring everything around me, it's not because it's easy. It's because I practice it every day. To be good at anything, you have to practice it every day. Make it your daily work.