https://encyclopedia.1914-1918-online.net/article/influenza_pandemic
The above is a link to a long and interesting article about the war and the flu. I’ve read other accounts that the war was “called” on account of the flu - but that is probably too simple.
The above article describes how it affected the different nations at different, critical times. Below is an excerpt from the end of the article, quoting a German Prince:
“On 3 August Rupprecht, Crown Prince of Bavaria (1869-1955) wearily noted, Poor provisions, heavy losses and the deepening influenza have deeply depressed the spirits of the men in the III Infantry Division.[43] It is a mark of how significant Ludendorff subsequently judged the loss of his men to the Spanish influenza to have been in impairing his offensives that, when, late in September, the writing was on the wall for Germany and he himself on the point of a nervous breakdown, he told the armys Surgeon-General that the recent fresh outbreak of the pandemic in the French army might yet offer Germany a last chance against outright defeat, just as in 1762 the sudden miraculous death of Elizabeth, Empress of Russia (1709-1762) had saved Prussia from defeat in the Seven Years War.[44]
Several years ago I read an article that implied that a fight between American and German troops in a tunnel is what introduced the influenza into the German army.