While you wait for a more targeted answer, you might be interested in some threads from the FAQ section on "Post Tramatic Stress Disorder before the modern era" as well as a recent search:
General
Ancient
Medieval
Early Modern and Modern
But how come it truly became a thing during late world war 1 I mean what caused it to be such a common thing in WW1 compares to all the other thousandso of years of warfare
This question is being downvoted (because it's asked so often) but it really is not a stupid question by any means and it has a very simple answer actually: WWI was separated from its previous conflicts because, as many historians theorize, it was one of the first (if not the first) wars that was truly, for its entire duration, constant fighting and struggle.
Think about this for a moment. Offensives before were relatively brief; the Hundred Years' War for instance had like, what, half a dozen significant non-skirmishes? Even as the general tempo of warfare picked up into the Napoleonic Era it still was more or less following that pattern: You march, you fight a battle in the morning into the afternoon, by night it's mostly over and you spend the fireside in relative peace with your buddies.
There are many terms for this, the one I hear often is 'fireside therapy'; that is, the fact that pre-modern soldiers (in the general) had the luxury to fight a battle in the day and then relax and share a fire with their comrades in relative peace and, many times, not have to worry about fighting another battle for weeks if not months or years, was crucial to their mental health. It becomes a lot easier to deal with the realities of war and the horrors of killing if you do it once or twice a year for a total of a few hours and spend the rest of the time just killing time.
While the Napoleonic Wars, again, saw great change to that it still fit that mold significantly enough and we see a gradual shift to this throughout the rest of the 19th century; yet it fully comes into form in its worst state in WWI. Men aren't fighting a battle on an evening and then both sides retreat and maneuver around eachother for a few weeks and get that kind of relative peace; they beat back an enemy offensive movement and tens of thousands more will be coming the next day, and then the next, and then the next. When the offensive ends it doesn't matter they need to stay on the front. They get no reprieve they get curling up in a ball in a trench being shelled endlessly for days if not weeks all while fighting battles and skirmishes alike.
So it's not like PTSD didn't exist before WWI it's just that, by the structure of war due to social and technological limitations, men generally had greater time to cope with their issues. By WWI with mechanized, industrious warfare and constant fighting across a front and men becoming near disposable with millions more in reserve they dont' get that 'fireside therapy'. They get "Welp we held off the Prussians today but tomorrow another battalion will hit us and another 2500 shells will hit our position, enjoy your night of sniper fire and machine guns whizzing over our trenches."
In other words they had no time during the war to internalize it and bond with it with their mates; they just spent it all fighting and dying and only after the fact with all the mental issues compounded up, especially things like survivors guilt, it all crashes down on them at once. All of that emotional baggage that would have been before alleviated every night or at least every other night through relative peace by a fireside that just wasn't for 2-4 years crashing down on them all at once.
But how come it truly became a thing during late world war 1 I mean what caused it to be such a common thing in WW1 compares to all the other thousandso of years of warfare