Hitler lost the war when he invaded the USSR. He did not have the resources to fight a 2 front war.
The commies had treated everyone so badly that they were ready for a change in government. Of course Hitler began to treat them every bit as badly and so that advantage vanished.
He really was stupid.