Thank gosh some foreign Country protect out weak American ships.
Crossing any strait is fraught with navigation regulations and “rules of the road.”
A naval warship, especially a SSN or SSBN, is most at risk while transiting a strait or canal. The Royal Navy has jurisdiction and the responsibility to ensure all parties crossing channels and straits, act responsibly.
As a navigating vessel, and a warship, there will be topsiders on sentry ensuring that no one gets too close — the rules of engagement are pretty clear (and standard practice). The entire crew is prepared from their hours upon hours of drill and practice.
There was no risk. The Royal Navy performed their responsibility. Spain might get their pee pee slapped in an arbitration panel for breaking navigation rules, which is something they’re obviously willing to pay in order to maintain their presence in the strait and retain their precedent.