Ww1 was fought in the trenches and Ive heard that it was an inneficient way to wage warfare. Why was WW1 fought in the trenches and Why wasnt there trenchwarfe in WW2?
The most direct answer is that technology advances to a pint where static trenches were no longe viable for long term defence.
At the start of the First World War, artillery and machine guns dominated the battlefield. Artillery could fill the air with shrapnel and machine guns could do it with bullets. That meant that being above ground was highly undesirable so digging below ground level became the norm to survive. At the time, machine guns were mainly a defensive weapon. They were too heavy to be carried forward with the infantry when they attacked so machine guns remained mostly static until the latter years of the war. Artillery meanwhile could be used to soften up enemy positions but infantry was still needed to capture the ground and deal with any remaining enemy forces. Due to the strength of defensive weapons technology, it became very difficult and very costly to overcome entrenched positions. That was until the advent of a reliable tank.
Tanks changed the landscape. While early tanks were too slow to have a major impact, they developed to a point where they could travel fast enough to avoid artillery fire or be fielded in such numbers that a good numbering would survive to reach the objective. Tanks were mostly immune to machine guns and could shrug off all but direct artillery hits. Suddenly, assaulting entrenched positions could be achieved with a higher chance of success and with fewer (albeit still high) casualties.
Post war, tank development continued and they only became faster, more heavily armed and armoured and most importantly, reliable (for the most part). When WW2 came tanks could rapidly cross battlefields, immune to infantry and machine guns and escaping artillery fire and overwhelm, destroy and capture enemy positions. In addition, many armies invested in developing motorised transport for their infantry so the infantry could keep up with the tanks and consolidate captured ground.
The development of aircraft also played a part but I have to get back to work so hopefully someone will come along and expand on that soon enough.