Main reason why Germany lost the war was starting it... Almost alone vs. all the remaining world - there was no chance to win.
However, if war was already started, further reasons of failure were:
- Underestimation of USSR, i.e. German Stuff assumed that `Barbarossa` will be like fights in previous campaigns. They did not adequately take into account a lot of factors, such as long distances in USSR and quality of roads. Also they hoped that Soviet people won't fight for Stalin's regime, and after short Blitzkrieg, like in France, when the regular army will be defeated, no resistance will remain. However, USSR announced the `total mobilization` and made up new divisions faster than Germans were able to defeat existing ones, so the Blitzkrieg failed and Germans were totally unprepared for long-lasting exhausting war.
- Unlike the USSR, Germany did not announce any `total mobilization` until the very end when `Volkssturm` and `Hitlerjugend` combat units appeared.
- The tend of military engineering to design low-number high-quality `Wunderwaffes` instead of mass production weapons.
- Insufficient use of man power, which in fact could be available. For example, Volunteer Waffen SS divisions from citizens of `new` Soviet Republics (Baltic states, part of Ukraine) were created only in 1943 and later. If do it earlier and promise a independence of these countries after defeat of USSR, the number and motivation of former-USSR citizen divisions could be greater. However, it was possible only if Hitler took step back of his Nazi ideology and refuse to make a pangerman `reichkommissariats` in occupied territories of USSR.