How did machine guns cause trench warfare?
Neither side could make charges of thousands of troops anymore in the face of massed machine guns. The British Army lost 60,000 troops in a couple of months trying to break the German lines. So, both sides dug in, used cannon to blast out the enemy, or poison gas to burn out the enemy, and trench warware became the way to do things.