The fundamental flaw of monarchies is that they raise or fall with the character and competency of a single person (or very small group). (This also applies to system where a single person hold a lot of power mostly unchecked, like e.g. a democratically elected president with way to much power).
Anyway the role they still play differs hugely depending on country. In some it's close to none, in some they still have a bit of old money in some they still have some political influence.
In the end Spain 1981 was lucky, lucky in that the King respected the choice of the people which had removed most of his families power from them. If the King instead would have wanted to reestablish royal power things probably would have ended pretty bad.
Maybe you're confusing it with Italy?
No harder than civility is for others.
And even in England, in A Man Called Intrepid, William Stevenson notes that it was important that the secret services swore their oath to the king rather than the prime minister. That way, if Germany had conquered England and replaced the prime minister, the secret services could have continued fighting without feeling like traitors.
Public officials can be easily replaced against their will – the system is designed for that. A king, on the other hand, remains a king until they die or abdicate. When that happens, the throne passes on according to an established line of succession. Any other king installed by a conqueror would be an illegitimate pretender. The conqueror could in principle force the parliament to alter the line of succession. But because the UK is a common law state without a written constitution, it's far from obvious if the parliament can actually do that under such circumstances without consent from the monarch and their heirs.
"[...]the King of Spain appeared live on television, wearing the uniform of the Captain General of the Armed Forces (Capitán General de los Ejércitos), the highest Spanish military rank, to oppose the coup and its instigators, defend the Spanish Constitution and disavow the authority of Milans del Bosch. He declared: I address the Spanish people with brevity and concision: In the face of these exceptional circumstances, I ask for your serenity and trust, and I hereby inform you that I have given the Captains General of the Army, the Navy, and the Air Force the following order: Given the events taking place in the Palace of Congress, and to avoid any possible confusion, I hereby confirm that I have ordered the Civil Authorities and the Joint Chiefs of Staff to take any and all necessary measures to uphold constitutional order within the limits of the law. Should any measure of a military nature need to be taken, it must be approved by the Joint Chiefs of Staff. The Crown, symbol of the permanence and unity of the nation, will not tolerate, in any degree whatsoever, the actions or behavior of anyone attempting, through use of force, to interrupt the democratic process of the Constitution, which the Spanish People approved by vote in referendum. From that moment on, the coup was understood to be a failure[...]"
Monarchs still have the same function they always had. The represent a direct connection between the nation and the people, and in times of crisis they can stabilize the nation or put an end to political brinkmanship, even if they only hold symbolic functions.
https://en.wikipedia.org/wiki/1981_Spanish_coup_d%27%C3%A9ta...