This was because Germany had many tactical advantages:
Having radios on all your tanks is a tactical advantage.
Making better use of your weapons is a tactical advantage.
Having better trained officers is a tactical advantage.
Being able to kill more of the enemy than they can kill of you is a tactical advantage.
But despite the German’s tactical advantages, the Soviets still won the war on the Eastern Front, because they could absorb huge losses of men, equipment and territory and still keep fighting. They had strategic advantages:
Having a much bigger population than your enemy is a strategic advantage.
Having an enormous country to retreat into is a strategic advantage.
Having your factories beyond enemy bombing range is a strategic advantage.
Being in an alliance that controls more than twice as much of the world’s GDP than your enemies is a strategic advantage.