Answers
1

"World War I broke out while Tolkien was a student at Oxford University. After finishing his degree, Tolkien joined the Lancashire Fusiliers as a second lieutenant.

In 1916 Tolkien was sent to France, where he and his fellow soldiers faced the terrifying new mechanisms of modern warfare—machine guns, tanks, and poison gas—fighting in some of the bloodiest battles known to human history. Tolkien fought in the Battle of the Somme, a vicious engagement in which over a million people were either killed or wounded....In the trenches of World War I, Tolkien began recording the horrors of war that would later surface in The Lord of the Ring...."

This excerpt is from a site that details this very subject. There is much more detail! I'll list it in my source link.