The US tried to infiltrate Spanish state security. That's a direct threat to Spanish sovereignty. Imagine if they had succeeded and it led to a manipulation of Spanish policy, against the interests of the Spanish people.
It is really something incredibly bad.
There are many countries to which the US is actually hostile, and which are much weaker than Spain. Venezuela, Cuba, etc. Places like Russia and China also of course exist.
Spain could start trying to compete with the US in South America, they could push some kind of EU South America expansion, some kind of EU analogue of BRICS-for-South-America-but-not-BRICS; and of course, if it truly became a problem they could decide to go much further than that and start being actually hostile themselves, joining with the whole RIC part of the thing.
I suppose you don't know this already exits (and has for decades), it's called Mercosul[1].
Also so t forget literally the entire Snowden era. Literally the biggest event geopolitical event between allies in the 2010s. I swear you guys choose to forget these things