During WW1, wartime censored the early reports of the illness to boost morality in combating nations.
But Spain was a neutral country so they didn’t have to worry about moral and were free to publicize the effects of the flu. Which gave the rest of the world the disillusion that the Spanish flu started in Spain as they were the only country making reports of it.
Hope this helps :)