So Catalonia has always been a region of Spain whereas Scotland is a sovereign nation which consented to joining the UK through the Act of Union. It's only part of the UK by a statute rather than inherently being part of the 'country'.
That's why Britain is referred to politically as the United Kingdom as it's a union of countries.
So for Catalonia to get independence, they have a much tougher argument as they're not a sovereign entity and it'd be much closer to a secession rather than Scotland pulling out of a treaty as would be the case here.