Eh. All you really need is a solid victory in the great northern war, and the keep the momentum going. Maybe Charles XII manages to keep the Ottomans in the war and forces a union on Denmark and/or Norway or something. At that point all you need is for France to do alright so they can feed Sweden.
I disagree. Charles XII pulled of miraculous victories in the Great Northern War. Again and again the Swedes defeated forces several times greater in number. The issue wasn't in pure warfare but in grand strategy. Although maybe if Sweden could have prevented the Livonian (Johann something) noblemen who forged the Grand Alliance from doing so, it could have staved off Russia without PLC getting involved. Not needing to look south could have allowed Charles XII to prevent Estonia and Livonia from largely falling while he was elsewhere, thus preventing his failed march on Moscow. Buying time could help, but only if that time is used to solve the larger problems Sweden was suffering. Victories in war alone wouldn't be enough.
Sweden needed to abolish serfdom earlier, increase the productivity of its lands and encourage population growth. So avoid the periods of noble dominance. It would also help if Sweden was able to make a lasting peace with Denmark-Norway, thus allowing it to devote its attention to its eastern possessions that would always be in Russia's sights (a country with a far greater population). Maybe a devastating victory early against Denmark leads to Denmark turning its focus west to its oceanic navy and oversea colonies to allow Sweden to focus on the Baltic. More development in Livonia and Estonia could follow. It would also prevent the OTL alliance between Russia, PLC, and Denmark-Norway.
Maybe avoid the Kalmar Union. The conflicts between Denmark and Sweden sown in that period persisted for centuries, and the efforts of each to subdue the other for their strategic goals hindered both. Sweden could have devoted more attention to the east against Novgorod, potentially secured more territory around the Gulf of Finland for a stronger position to hopefully discourage any Russian attempt to secure a port on the Baltic.