Here's a rough idea. of the timeline until 1716
A multitude of crowns
POD: 1789 George of Denmark and Anne of England son William have some slightly better genes, so he end up a healthy baby boy
Effect no diffence until 1702.
1702 Anne are crowned Queen of England, Scotland and Ireland. William becomes Prince of Wales
Sweden are rather terrified over that a member of the main Oldenburg family has become Prince of Wales. Negotiation begins for a marriage alliance between William IV and princess Ulrika Eleonora of Sweden, in efforts to strengthen the familiar bonds between Sweden and England and weakjen the ones between Denmark and England.
1706 William and Ulrika are married.
1709 William and Ulrika get their first surving child, they babtise him William. Several children follow the next decade, of their children 7 survives, 3 boys (William 1709, George 1715 and Christian 1721) and 4 girls (Elizabeth 1710, Caroline 1711, Mary 1715 and Amalia 1719). The focus on producing the large number of children are for William to secure the throne.
Denmark declare war on Sweden and invade Scania, most of Scania are occupied, only Landskrona and Malmö, which are besieged. (this happened in OTL)
1710 Here's comes a interesting change, in OTL the Danish commander Christian Ditlev Reventlow fell sick when the Swedish army came to reconquer Scania, and his lieutenant-general Jørgen Rantzau was left in command. Reventlow had planned to met the Swedes in south west Scania, where it was easy support from the units which garrisoned Malmö and Landskrona. Rantzau on the other hand moved the army toward Helsingborg to defend it. When the battle began Rantzau left his post as commander to take personal part of the conflict, which created confusion in the ranks. The two armies was equal sized, so getting a support from besieging troops would put the Danes in a superior position. So Reventlow stay healthy. Why; because I fell like it.
The Battle of Malmö end with a Danish victory, more than half of the Swedish force are either killed (5000) or captured (3700), while the Danish side lose 3500 man. The swedish army begin a retreat from Scania but a following Danish force follow and in the Battle of Landskrona the Swedes are defeated again, with a 1000 dead and 1700 captured less than 3000 Swedish troops succed in retreating from Scania.
Sweden are in quite bad situation, Scania are occupied for at least a year more, and much of soldiers used, was the ones needed to protect Bohuslen from a invasion from Norway. The captured Swedish common troops are conscripted into the Danish army. This mean that the Swedish attempt to reconquer Scania has strengthen the Danish position both in absolut and comparative terms.
The effect: in OTL Karl XII didn't sign a treaty with Denmark, Prussia, Hannover, Saxony and Russia to keep the Swedish German provinces neutral in the conflict (forced on them by Netherlands and England), because he dreamed about using Vorpommern to invade Poland in cooperation with Ottoman forces. This resulted in England/UK and Netherlands allowed the Swedish enemies to attack these province. With a loss of Scania Karl XII may get a moment of clarity. But honestly I doubt it. The guy was a megalomaniac idiot with a good PR agent. So he won't get a case of common sense.
Danish troops begin under Reventlow move north into Halland toward Göteborg. They begin a siege of Göteborg as the winter begins.
1711 Woldemar Løvendal lead a Danish invasion force into Bohuslen, the weakness of the Swedish side allow him to occupy the province and join with Reventlow at Göteborg. Landskrona fall the same year, while Malmö stay besieged.
At the same time Denmark, Saxony and Poland begin a invasion of the Swedish and Gottorp possesions in Germany. A Danish army of 30000 men under the command of Frederik IV invade Gottorp which are fast occupied move into Mecklenburg, where they leave a small force to besiege Wismar and continued east to Stralsund, where the Danish forces join the Saxon-Polish-Russian forces which besiege it. This give the Swedes time to supply Wismar.
Stenbock used most of the year on reestablish the Swedish a Swedish force to break the siege of Göteborg. But with almost 30000 troops Danish troops besieging the town, he is in a bad situation. It worsen with the fall of Göteborg in early November. This mean a loss of a important Swedish naval base. But it also put Denmark in a hard choice, they can either move inland, which would put pressure on their supply line, keep occupying the territories they have gotten or send some of their troops to Germany. The Danish king choose number two, through it may make the Danish force weak to Swedish counteroffensives.
1712 Denmark invade Bremen-Verden and after the fall of Stades, the duchy are in Danish hands. The Swedish possesions in Germany are now limited to the besieged fortress towns of Stralsund and Wismar.
The fall of Malmö in the spring meant that Scania was now fully on Danish hands. A force of 10000 Danish troops began a march toward Kalmar, which they began besieging.
At the same time a force of 25000 Swedish soldiers under Stenbrock moved toward Göteborg, where they in June meet the Danish force of 30000, while Stenbrock did well, the Swedish forces was defeated with almost 7000 dead and 5000 captured (Danish side 6000 dead), Stenbrock began a retreat, Reventlow fear of the bad supply lines, resulted in the Danish army staying around Göteborg.
There began more and more demand in Sweden for a end to the war
1713: Wismar falls to Danish forces, negotiation begins between the different side, but they are stopped by Karl XII demands that Sweden stay in the War. Mostly the war has stopped this year, the siege of Stralsund continue
Karl XII fearing that his country are going to surrender, are smuggled to Sweden, he arrive late oktober to Stockholm, where he push Stenbrock aside and begin planning a offensive against the Danes.
1714 Anne dies and William become King William IV of England and Ireland and William III of Scotland.
The year start with a fall of Stralsund to Danish-Saxon storm.
Karl XII leading a force of 41000 man against Göteborg, Reventlow whom only have 25000 man decide for a defensive battle, he garrison his troops in Göteborg. Karl XII try to break the siege through a storm, not only do the storm fail with almost 5000 dead on the Swedish side (and less than 400 on the Danish) Karl XII are killed in the storm (later rumours are that he was killed by his own).
High Council of Sweden (Riksrådet) begin to look for a candidate for the throne, while Karl Friedrich of Gottorp are suggested, the High Council decide to look to England, in hope that a union with England, can bring a more lenient peace. So Ulrika Eleonora are elected queen, negotiation with William IV of England begin to whether he can or will become king. Sweden are in a bad situation, and the only demand they push, are that William has to respect the Lutheran Church position as the sole and rightful church of Sweden. William are crowned as Wilhelm (I) of Sweden.
1715: Negotiation begin with the different side in the war, Denmark are in a rather good position, especially with England not wanting to join the war, Netherlands not wanting England to control the Sound and the close relationship between William IV and Frederik IV. The treaty of Malmö end with Sweden giving up Scania, Blekinge, Bohuslen, Schleswig-Gottorp(the Gottorps keeps Holstein-Gottorp) and Wismar to Denmark, ceding their exception from the Sound Dues and break it alliance with the Gottorps. Saxony receives Bremen-Verden. Denmark pay 500000 Rigsdaler to Sweden and 200000 Rigsdaler to the Gottorps, while Saxony pay 150000 Thaler (600000 Rigsdaler). Sweden keep Vorpommern and Strettin.
The War of Spanish Succession end and England join the war on Swedish side (more to keep the Russians to gain to much, than to help their king). With the money from Denmark and Saxony Sweden was able to restart the fighting with Russia.
1716: With the English navy Swedish tropps was able to land on Ösel and Dagö and reoccupy them, the Russian navy are defeated by the Swedish-English alliance. Further offensive in Livonia and Estonia are beaten back by the Russian forces, but the Swedish troops has some succeses in Karelia.
1717: Russia and England-Sweden make peace in the Treaty of Reval (Tallinn). Sweden give up Livonia, most of Estonia and Swedish Ingria. Sweden keep all of Swedish Karelia, Dagö, Ösel and Wiek.