Haven't the same sovereign didn't really united the kingdoms under a single government with the House of Orange or House of Hanover so wondering if Scotland's bankruptcy over the Darien expedition matter more to uniting the kingdoms than the accession in England of the House of Stuart?
Ok, I think I get what you're driving at.
So the important thing is that a personal union is not the same thing as a real union or a political union, and so on and so forth. In a personal union, you have two (or more) separate and independent governments that just happen to share the same monarch.
When it comes to Scotland's political union with England, I would agree that the failed Darien scheme (in which Scotland sank about 20% of all the money in the country into setting up a colony in Panama, only for 80% of the colonists to die in the first year) played a significant role in getting the Scottish Parliament to agree to the Act of Union in 1707.
But it wasn't the only factor. (After all, there had been periodic efforts to pass an Act of Union for a hundred years, under both the Stuarts and the House of Orange, which failed due to religious politics.) So what were some of the factors?
Royal succession was a major issue. After the Glorious Revolution of 1688 and the Jacobite Rising of 1689, the governments of both England and Scotland realized that the question of succession was a major national security issue for both countries. However, it was not clear that England and Scotland would remain in personal union after the reign of Queen Anne, largely due to disagreement over which particular Protestant monarch would be chosen that were actually a proxy for economic conflicts...
Trade was a major motivation. When the Scottish Parliament passed the Act of Security of 1704, which mandated that Scotland's choice of the next monarch would have to be different from that of England unless England agreed to free trade with Scotland, the English Parliament used the Alien Act of 1705 to ban exports from Scotland to England (which was around 50% of Scotland's total international trade at the time) in order to strong-arm the Scottish government into negotiating over union.
Naval policy was a major motivation. As a small independent kingdom, Scotland's merchant marine fleet got hit pretty badly by privateers during the many European wars of the late 17th/early 18th century. Union would mean protection for Scottish merchant ships from the increasingly powerful English (soon to be British) navy.













