The UK legal system, as a single body, doesn't exist. The UK is split up into four main jurisdictions: Scotland, England, Wales and Northern Ireland. However, these jurisdictions don't have equal power. Westminster (English) Parliament has supreme authority, with Northern Ireland and Scotland having devolved powers, and Wales, to a lesser extent.
It's often taught in England that we're learning the legal system of England and Wales. Although Wales has its own devolved powers, with the Government of Wales Act 1998 establishing the National Assembly (that has since been expanded and renamed to a Parliament) it has a long history of being a united kingdom (haha) with England and hence, they have a lot of shared traits in their legal system.
Scotland is a lot more complicated. Scotland was, for most of its history, an independent nation to England. As a people, Scots are often keen on independence and widely dislike being referred to as British, proud of their unique heritage. The issue of Scottish independence has been debated for a while, with the results of the referendum held in 2014 leading to the Scotland Act 2016, granting them more devolved powers.
But wait, what are devolved powers? In simple terms, they are powers the Westminster government has granted governments such as the Scottish government. Matters of determining international law and immigration law, for example, are reserved matters the Scottish government cannot change for itself. Devolved powers Scotland has include agriculture, infrastructure, education and tax (granted more recently), among others.
Scottish independence only became even more important after the UK's referendum to withdraw from the European Union. The majority of Scots wanted to remain in the EU, and the UK's decision to withdraw was argued to break the Sewel Convention.
Conventions are not laws, but long-established practices that are widely considered binding rules by constitutional lawyers. The Sewel Convention is the convention that the UK (Westminster) should not normally rule on devolved matters without the consent of the devolved nation. The Sewel Convention was recognised in the Scotland Act 2016, but it is not regarded as a law in itself. This is solidified in the case of R (Miller) v Secretary of State for Exiting the European Union, often known as the Miller 1 case, where the courts ruled that the UK Parliament could break the Sewel Convention and pass the European Union (Withdrawal) Act 2018 without Scotland's consent and withdraw Scotland from the EU. Giving notice to withdraw the EU, as mentioned in article 50 of the TEU (Treaty on European Union), is irreversible and binding.
While international law and relations are Westminster's jurisdiction, EU law had long had supremacy over UK law since the European Communities Act 1972, creating binding law on many subjects over the UK including Scotland that the 2018 Act revoked, therefore affecting devolved matters.
With this in mind, it's not hard to understand why Westminster is often regarded to have an oppressive, restricting grip on Scotland. Some even go so far as to suggest Scotland's devolved powers are an incentive to give them the illusion of independence, to present a united front and bribe them away from a full revolt.
Obligatory warning: This is largely from memory and I haven't checked/sourced everything like I would if it were an academic assignment. While I aim to be educational and informative, I am not a trusted authority in law, just a passionate student.