That sentence is very poorly worded. Do you mean 'How did soldiers in World War 1 and 2 protect their hearing when firing their weapons?'
If so, I don't believe they did. Infantry units were not given hearing protection but I believe artillery crews were for some of the allied armies. I'm sure someone else can answer this question much better than I.