Scotland is permitted independence if they vote for it. They had a referendum on that in 2014, and voted against it.
I don't follow Spanish politics, but from what I do understand, sure. Spain wouldn't support ethnic self-determination either.
Personally, I think that in general ethnic self-determination is fine. It starts to get squirrely if the "mother country" provides individual freedoms and legal protections that the breakaway enclave would not recognize. In that case, the argument is that the country is protecting the legitimate rights of those of its citizens who constitute a minority in that enclave.
Spain has gone to a regional autonomy model that has reduced much of the intensity for independence. It continues but isnt quite what it was.
Catalonia has a very big problem as far as independence goes, because throughout the 20th century it attracted millions of migrants from elsewhere in Spain, as Catalunya was an economic powerhouse of the country. On the whole these people dont want an independent Catalunya.
On the occasion of the last Catalan independence referendum there were large and noisy demos, in Barcelona, of people who wanted to remain Spanish.
This is a complex subject, but at this point its likely that ethnic Catalans (however defined) are a minority in their own country.
The Basques arent in such a position, though they were and are also an economic powerhouse. The general political program can be summarized as independence “eventually”, but in the meantime the gameplan is to negotiate even greater autonomy.
Just not in Ukraine...or Scotland, Catalonia, etc...got it.