The 1918 pandemic did not get the name ‘Spanish Influenza’ because it originated in Spain, or, as was thought at the time, because Spain was the country hardest hit by it. Spanish Influenza was called Spanish Influenza because it started during WW I, when most countries were censoring information about a lot of things, including the flu. Neutral Spain wasn’t, so it was (erroneously) believed to have more cases than anywhere else.
https://www.history.com/news/why-was-it-called-the-spanish-flu