There are at least two main reasons why Germany lost WWII. They are the fact that Hitler overreached and made bad decisions and the fact that the US was simply too big and had too much manufacturing capacity.
First, Hitler made many grave mistakes. One of the two biggest mistakes he made was to invade the Soviet Union in 1941. If Hitler had simply maintained his nonaggression pact with the Soviets, he might well have been able to either force England to agree to peace or to invade England. Either way, he could have dominated all of Western Europe and then had an end to the war. Hitler's other huge mistake was to declare war on the US after Pearl Harbor. It is not 100% clear that the US would have fought Germany otherwise. There was a clear reason to fight Japan, but it is not certain that that would have been enough to make Americans willing to fight in Europe as well. Hitler made that decision himself.
Second, once the US got into the war, the end was almost inevitable. The US simply had too much industrial power. The US could manufacture seemingly unlimited amounts of war materiel and there was nothing Germany could do because the US was well beyond the range of Germany's bombers.
These reasons combined to be the major causes of Germany's loss.