If you’re habitually resident in Spain, or own property here, and haven’t made a specific choice in your will, Spanish succession law
can apply to your entire estate by default — including “legítima”, a forced heirship rule that reserves a fixed share for your children
regardless of what you’d actually want.
Under EU rules, foreign nationals living in Spain can choose in their will for the law of their own nationality to govern their estate instead — restoring full testamentary Freedom.
This still applies to British nationals after Brexit, because it depends on where you live, not on whether your own country takes part in the regulation.