Let's say that, by some miracle, King Harald V became the king of the UK after everyone before him in the line of succession died (and he received permission from the Storting). Do the positions of King of the UK and the Norway then "fuse", where both would be passed onto Harald V's successor if he died, or do they pass on separately to different people?
Elizabeth II is Queen of the United Kingdom, of Canada, of Australia and about 15 other countries around the world. These countries have now established absolute primogeniture as the law of succession. But this only applies to people born after 2011
Norway also has absolute primogeniture, but the law is framed in such a way so that Crown Prince Haakon remains as heir ahead of his older sister.
There is a minor issue that Norway requires the Monarch to be in the Church of Norway, while the UK requires its monarch to be Head of the Church of England. The two churches are in full communion under the Porvoo Communion. It seems possible to be a member in good standing of both churches, so no doubt this could be fudged. However there may be a situation in which the heir to one throne is not the heir to another, in which case the two monarchies naturally split.
An example of this was the Hanover Kings of Great Britain. The law in Great Britain allowed for a queen to reign, but the law of Hanover did not, so Queen Victoria became Monarch in the UK, but her uncle became King of Hanover.
So King Harald would become King of the United Kingdom (and Canada, and Australia etc) and the crown would pass to Prince Haakon on his death. The Parliaments, laws, seat on the UN, and everything else would be unaffected. The UK and Norway would remain independent of each other just as Canada is independent of the UK.
JamesK has given an overall good answer, but I would consider the requirements for the British Monarch to be the head of the Church of England, and the Norwegian Monarch to belong to the Church of Norway to be more than a minor issue.
As a personal union of the crowns would probably be undesirable for workload/national symbol reasons, a rather plausible outcome would be that the church requirements are taken as a reason to keep the crowns separate. In such a scenario, a descendent of Harold V would convert to Anglicism and take on the Commonwealth crowns, while the Norwegian crown would separate. Some of the Commonwealth monarchies might turn republic, or pick a different monarch though. Ultimately, the various parliaments are in charge of who gets to be monarch.
If we do ignore the religious issue, and assume no further changes to the succession rules, then first Harold V becomes king of both the UK and Norway, and then Prince Haakon inherits both crowns. However, his successor as the Norwegian King would be Princess Ingrid Alexandra (as his eldest child), whereas the British crown would go to Prince Sverre Magnus. The reason for this is that Ingrid Alexandra was born before the UK switched to absolute primogeniture, and the switch was not applied retroactively.