Artillery (be it cannon,howitzer or mortar) was the biggest killer in WW1 as it accounted for over 75% of all battlefield casualties. Followed by the Machine Gun as the second biggest killer. The machine gun was deadly when it was attacked.
I hope this helps