In Flanders Field, for example, where lines moved back and forth by a couple meters. Once you've advanced those few meters into no man's land, how do you hold it? I've read that trenches were up to ten feet deep; how do you dig a new trench in the middle of no man's land under enemy fire?
I've been watching The Great War on YouTube but have been having trouble understanding exactly what the front lines looked like on a small scale. How were trenches getting dug beyond territory you already held?
You don't start digging a trench from the ground down, you start digging your trench by expanding your last trench. People weren't jumping around exposed with shovels on the surface in an established fight dodging bullets while swinging a shovel.
Before a unit gets into conflict, but if it anticipates an attack, it'll start enhancing its protection gradually. You can protect yourself quickly by using sandbags and microterrain, digging a short fighting hole for crew served weapons, and then expanding those fighting holes down, connecting them to each other, clearing anything blocking your view, and placing obstacles to impede movement in any direct but where you have machine guns pointed.