Under UK tax legislation a UK domiciled individual is subject to IHT on all property owned whether located in the UK or overseas.
The above would apply in addition to any taxes you might face in Spain.
I think one point that many expat UK residents are unaware of is that inheritances from people in the UK are taxable in Spain even though no UK IHT may be due because of the (relatively compared to Spain) high allowances in the UK.
For example, the death of a parent in the UK, with an estate below the UK tax threshold of 250K “ish”, leaving it all to a Spanish resident, will incur the full Spanish IHT with very few allowances.
Assuming of course that it is declared!!