Brexit is the main reason the SNP give for wanting another referendum so soon after the last. While an independent Scotland as part of the EU would enjoy a larger single market than it enjoys as part of the UK, leaving the UK’s single market would impose short term costs almost certainly greater than the costs of Brexit. The government that enacted Brexit refuses to allow another independence referendum. A future Labour government might be less inclined to deny the Scottish people any say on independence, but that government could also start a process that would undo much of the harm caused by Brexit.
With Conservatives in power independence involves short term pain and long term gain
I cannot comment on the legal reasoning that lay behind the Supreme Court ruling that a referendum on Scottish Independence would be illegal without the cooperation of the UK government. (On that, see Dave Allen Green here and here.) However I cannot defend the decision of the UK government to refuse a referendum, or any law that says this is sufficient to prevent a referendum on independence.
The UK government’s reason to refuse another referendum is that it is too soon after the last one. But the reason that the SNP give as justification for pushing for it is Brexit. In a very important sense they are right. Not only did Scotland not vote for Brexit, and the economic damage it is doing, but Brexit gives the SNP’s claim that the economic future will be brighter after independence something beyond mere wishful thinking. The EU Single Market is a lot bigger than the UK’s Single Market.
I wrote about this four years ago here. There is no doubt that in the short term Scottish Independence will be very costly for the people of Scotland. In 2014 the only real economic compensation on offer was that different governance after Independence would bring a fairer but poorer society. So the economic trade-off independence offered was clear and certain short term pain set against the hope of possible long term benefit. But if Scotland was part of the EU’s Single Market and Customs union, it could eventually avoid the long term pain that Brexit will bring the rest of Great Britain.
But there is a counterpoint to that, which is that when Scotland does join the Single Market and Customs Union, they will have the considerable short term pain of creating a border with their largest market: the rest of the UK (rUK). That is in addition to the cost that dominated the 2014 referendum, which was the loss of the fiscal transfer from the rUK to Scotland. Scotland might still be better off in the long run, as its exports reorientate from rUK to the larger EU market, but that takes decades to happen.
So in terms of the economics, what was in 2014 a trade-off between certain and pretty large costs in the short run versus the hopeful possibility of benefits in the longer term becomes much larger and still certain short term costs against more tangible long term  benefits of being part of the EU. Adopting the Euro also carries clear risks as long as the Eurozone’s fiscal rules remain a mess.
However the prospect of a Labour government changes that trade-off in a critical way. To see why, it is useful to first talk about inevitable Brexit stasis under the Conservatives.
Over the next decade at least, only one party can reduce the costs of Brexit
In the last few weeks there have been two changes that represent a turning point for Brexit. The first was the humiliation of Prime Minister Truss, coupled with her successor being chosen by MPs alone. Truss was the candidate of the Conservative party’s European Research Group (ERG), who have consistently pushed for the most extreme form of Brexit. The second is that we are finally seeing across the broadcast media discussion of the costs of Brexit. With the UK economy being alone among the G7 in failing to regain output levels seen before the pandemic, and about to go into recession, it just wasn’t possible to avoid the subject any longer.
But last week it also became clear (if it was ever doubted) that the Conservative government cannot change the Brexit deal that Johnson agreed in 2020, because it is hopelessly divided. The ERG may have lost their leader with the downfall of Truss, but they are still powerful enough to stop any attempt to change that deal. Leaks suggesting the government were looking for a Switzerland type deal have been met by a chorus of denials from ministers and Sunak himself. Given the party’s terrible position in the polls, and a general election not that far away, Sunak cannot afford to risk the internal division that any attempt to rewrite Johnson’s deal would cause. The best we can hope for is that he is able to come to an agreement with the EU on the Irish protocol.
Nor would anything change if he was able to win that General Election. Not only has he to pacify the ERG, both the right wing press and his party members remain solidly pro-Brexit. Even if that was not enough deterrent, there is the ever present threat of Farage or someone similar threatening to take Tory votes and even some Tory MPs. All this means that for the next decade at least, no progress in reversing the economic and political harm caused by Brexit can be made while the Conservative party is in power.
So just as a Conservative government will not allow another independence referendum, it will also do nothing to alter the heavy costs of Brexit that the UK is experiencing.
However we now have the strong prospect of a Labour government. In opposition Labour have been extremely cautious. The last thing they want to do is unite a divided Conservative party and revitalise the right wing press in labelling Starmer a rejoiner. With polls like this, it is far safer for him to talk about improving relations with the EU, without being specific about how that would be done. With the Conservatives offering nothing, while Labour offer hope, only Remain voters who have learnt nothing from 2019 would refuse to vote tactically against the Conservatives.
Once in government, however, the trade-offs for a Labour government will change. It will become clear that the economic gains from a closer relationship with the EU while still outside its customs union and single market are pretty small. Labour will become responsible for the health of the economy, and just as the costs of leaving the EU are now becoming clear, so will the economic benefits become clear of rejoining the EU’s Custom Union and particularly their Single Market. The political risk of doing either noted above will still be there, but they will diminish in size over time. For both reasons, becoming part of the EU’s single market will become more attractive over time, and the pressure on Labour to move in that direction will only grow.
Brexit has encouraged independence, but could also mean it fails
Brexit was missold to the UK. Almost everything the Leave campaign said was a lie. Saying there would be no economic costs and only benefits was a lie. Saying there would be more money for the NHS was a lie. Saying UK trade would flourish under ‘global Britain’ was a lie. Saying we could negotiate trade deals more advantageous to the UK was a lie. Saying prices would fall was a lie. Saying immigration would be lower was a lie. The list is endless. Whenever evidence that these were lies was put into the public domain during the referendum campaign Leavers had a simple response: they called it Project Fear. Project Fear became synonymous with don’t worry about the facts, just believe the lies.
But the term Project Fear did not originate with Brexit, but in the first Scottish Independence referendum. The short term fiscal costs of independence were large and undeniable, yet the Yes side, like Leavers, preferred to use denial and misdirection rather than acknowledge this fact. As with the Brexit referendum, they could get away with this because what was being proposed had not been done before. 
However the similarities between Brexit and an independent Scotland joining the EU are too great and too recent to dismiss as Project Fear. Leaving the EU’s Single Market has caused the UK significant economic loss, and there is every reason to expect that Scotland leaving the UK single market would cause even more in the short term. In the long term firms in an independent Scotland that was part of the EU would have a larger market, but it takes considerable time to reorientate firms from one market to another, including the time and costs involved in persuading that new market that you have something worth selling. That time period will at best involve Scottish firms producing less and employing less people, and at worst it means these firms might no longer exist.
It will be very hard for the proponents of Scottish Independence to on the one hand give Brexit as a key reason for wanting independence, and on the other hand to deny the costs of leaving a large single market on which Scotland is currently so dependent.
If the independence referendum had taken place under a Conservative led UK, then the UK government would have been in a bind, because it would not want to point to Brexit as evidence of the short term costs of leaving a single market.  But we now know that will not happen, because a Conservative government will not allow another independence referendum.
A Labour government would be less inhibited, but could still face difficulties if it was trying to pretend it could make a success of Brexit. As long as it stayed doing that for fear of opposition from Leavers, it would find it hard to fight an independence referendum and would therefore be disinclined to grant one. However the moment a Labour government became committed to seriously undoing parts of Brexit (by joining the EU’s single market, for example), the case for a second Scottish independence referendum becomes much weaker.
It would become weaker because Brexit could no longer be used as a justification for another referendum. But it also becomes weaker because the long term gains of an independent Scotland as part of the EU having a larger single market also disappear, because these gains could be had by staying in the UK. Finally, using Project Fear to discount the short term fiscal costs of independence becomes weaker because Brexit has discredited that form of defence.
Brexit has given Scotland a reason for having another referendum, and has also given some credibility to the long term economic future being brighter after independence. Unfortunately for those advocating independence, those arguments only work if Brexit in its current hard form is permanent. That would be the case for at least a decade if the UK is led by the Conservatives, but the Conservatives will not allow a referendum. The UK under Labour might, but it would only be wise to do so if that Labour government could admit that any hard Brexit is bound to bring large economic costs. A Labour government that was seeking to rejoin parts of the EU would severely undermine the case for another independence referendum. Thus Scottish independence and Brexit have become inextricably intertwined.
 Here long term means a few decades at least before there is any chance of the benefits of EU membership exceeding the costs.
 Some have suggested that the short term fiscal costs of independence could be overcome if an independent Scotland had its own currency. Then, it is claimed, having a large budget deficit would not be a problem , because all the new Scottish central bank needs to do is create the money equivalent to the previous transfer from the rUK. Because there would be no greater claim on Scottish resources, it is argued there would be no inflationary pressure.
This ignores the fact that an end to the rUK transfer doesn’t just create a budget deficit, it also creates a current account deficit. At present Scotland is consuming more goods and services than it produces because of the transfer. The rUK is financing both a Scottish current account deficit and a budget deficit. There is every reason to believe that this Scottish current account deficit is not sustainable (the private sector would not replace the rUK transfer by capital inflows), and so the Scottish real exchange rate would depreciate on independence.
That depreciation would help Scottish exports and diminish its imports such that the current account became sustainable. However a depreciation means a reduction in the purchasing power of Scottish consumers, making everyone in Scotland poorer. Higher exports and lower imports also means a larger demand on Scottish resources, creating inflationary pressure.
 In many ways we may see a repeat of 2016, where Cameron having set immigration targets and having failed to meet them, left himself wide open to claims that immigration can only be controlled by ending free movement. The obvious retort that immigration was good for the economy was not open to him. The Brexiters, having created a customs border between Great Britain and the EU, will find it hard to wax lyrical about the harm an English/Scottish border will do.