This. In a lot of cases a "super-size" version of the country might have little in common with its OTL version and the "super-size" and OTL versions might not get along well. Russia's portal might be to a super-powerful Soviet Union that won the Cold War, Germany's portal might be to a super-powerful Germany that was on the winning side of WWI and is still ruled by a Kaiser, Macedonia's portal might be to a version of Alexander's empire that managed to last where most people worship Zeus and Isis, Turkey might get a portal to a successful super-powerful Ottoman Empire, Israel might get a portal to some alternate world that diverged from ours thousands of years ago, as you said the Vatican portal might be to some Catholic theocratic empire, etc..
It probably depends how similar it has to be to the original on our Earth in order to count as the "same" country? Also, on a related note, how far back is the point of divergence allowed to be? Because I think that say, some Hellenic-descended superpower in the Mediterranean and Southwestern Asia would be so divergent from Macedonia today in culture, language, even demographics, etc.., that it might strain the spirit of the OP a bit. You would naively expect a country going through "its portal" to at least be able to hold a conversation with their super-powered equivalent, and I feel that naïve expectation has to carry a lot of weight weight in a good-faith reading of the scenario.
So as always with these sort of threads, the crucial question is what kind of genie is enforcing this wish, how exactly they are interpreting it, and how much of a stickler for detail they are, and in what ways.
Assuming that the superpowered versions of countries have to be at least vaguely recognisable to their IRL counterparts, then I think there are a few options. In an infinite number of universes, there probably is
some timeline which could lead to San Marino becoming a global superpower. It does not have to be
plausible, or probable, just
technically physically possible. (Some confluence of international banking and a much more rigid system of international diplomacy and
condottieri contracts starting in the Renaissance, say.) A lot of the timelines which could lead to such things, however, would probably be
weird, potentially deeply weird.
Depending on what PoD cut-off is allowed in time, then the most probable universes might actually not work just by different history, but perhaps even humanity having taken a different turn sometime early in our history on Earth. (A slightly more bonobo-like humanity, for example, might allow a lot of different possibilities in international politics than our more warlike offshoot.) If allowed, then these "strange humanity" timelines could probabilistically outnumber the "strange history" ones, especially for small nations where any historical sequence of events leaving them as a superpower is likely to be incredibly improbable.
The boring answer, of course, would just be to invoke nuclear war for the smaller nations, and have them be relatively intact survivors of a large nuclear exchange at some point in the 20th century, and thereby be superpowers in the future world. As I recall, Poul Andersson even had this happen with Sweden in
Tau Zero. I can't make a great mental estimate of whether these universes would be more probable than ones where humanity was somehow different, but they probably are.