Why did Germany finally surrender?

Hitler was dead
They ran out of resources
Soviet Union broke their promise not to attack
They were surrounded by the Allies

Germany finally surrendered because they were surrounded by the Allies and were running out of resources. Additionally, Hitler was dead, and the Soviet Union broke their promise not to attack, leading to increased pressure on the German forces.