The enthronement of Donald Trump and J.D. Vance at the Republican National Convention, the defenestration of Joe Biden and his anointing of Kamala Harris as the Democratic heir, the attempted assassination of Mr. Trump and a scandal over the Secret Service’s performance all have heads spinning at home and abroad. For Americans caught up in the presidential drama, the news was more about personalities and parties than foreign policy. But for foreign governments struggling to understand the direction of the world’s largest military and economic power, the news was all about uncertainty and risk.

By selecting Sen. Vance of Ohio, Mr. Trump doubled down on the populist, antiestablishment approach to foreign policy that shocks some and thrills others abroad. Mr. Vance is skeptical of aid to Ukraine, supports protectionist tariffs, and advocates a Jacksonian-inflected MAGA agenda.

Vice President Harris’s apparent ascension as the Democratic nominee suggests that Democrats, too, may be moving away from the center. The picture is murky because Ms. Harris hasn’t left deep footprints in important foreign-policy debates and decorum obliged Harris staffers to emphasize their mind meld with Team Biden on all matters. But people familiar with the thinking in both camps believe significant differences on the Middle East and other issues could soon emerge.

Whether Mr. Trump or Ms. Harris takes the oath of office in January, President Biden will likely be remembered as the last of the post-Cold War presidents. While revisionist powers like China, Russia and Iran have been mounting forceful challenges, public skepticism is rising at home on both the left and the right about the American-led world order. Team Biden sought to preserve the order that was established after World War II and then strengthened and extended by Presidents George H.W. Bush and Bill Clinton after the Cold War.

First and foremost, this meant cementing ties with allies in Europe, sorely tested during the disruptive Trump presidency, based on the values of international law and democracy at the ideological core of the old world order. Once Russia invaded Ukraine, the current administration’s focus shifted to building a coalition that will, Biden aides hope, ultimately force Vladimir Putin to end the war on terms acceptable to Ukraine and its Western supporters. In Asia, Team Biden successfully transformed the old hub-and-spoke model of U.S. alliances to what officials call a “lattice structure,” in which cooperation among U.S. allies in Asia strengthens the alliance system as a whole. (The U.S. has had treaties with several Asian allies, but there was relatively little integration or cooperation among countries like South Korea and Japan.) In the Middle East, the Bidenites worked on uniting Israel, Saudi Arabia and the U.S. to offset Iran’s relentless drive for hegemony. Complicating Team Biden’s bid to maintain the old international order was the burden that emerging problems placed on a struggling international system. Engineering the transition to a net-zero future means replacing the global energy system with something radically new. Change on that scale is risky and expensive, and it adds considerably to the difficulties of managing an international system already under attack from geopolitical rivals.

Simultaneously, the general retreat of democratic governance in much of the world, along with the increasing prominence of LGBTQ issues in the Western human-rights agenda, made Team Biden’s “democracy vs. autocracy” framing of American strategy a tough sell in much of the Global South.

The trend toward greater protectionism will likely continue no matter who enters the Oval Office in January. Both Mr. Trump and Ms. Harris will focus on enforcing strict rules of economic engagement with China. Beyond that, Mr. Trump would stress national defense and restoring American manufacturing jobs in his trade policy. A President Harris might organize a restrictive trade agenda around the energy transition and green tariffs.

Time comes for us all, as Mr. Biden discovered last weekend. The question American allies and adversaries alike will be asking amid the race to succeed him is whether Father Time also has come for the policy of global engagement in defense of an American-led world order. A recent Pew Research Center survey found that majorities of under-30 American adults ranked only three foreign-policy goals as top national priorities: dealing with climate change, stopping the spread of weapons of mass destruction, and defending the U.S. against terror attacks.

We live in dangerous times; old certainties are falling by the wayside. Mr. Biden’s successor will need clear vision and superb leadership skills to surmount America’s challenges abroad.