BUENOS AIRES — He didn’t sit down with two of his favorite strongmen. He downgraded a meeting with one ally and postponed one with another. He exchanged icy smiles with the prime minister of Canada, who had threatened to skip the signing of a new trade agreement with the United States and Mexico because of lingering bitterness over steel tariffs.

And President Trump was preoccupied by legal clouds back home, tweeting angrily that there was nothing illicit about his business ventures in Russia, a day after his former lawyer Michael D. Cohen pleaded guilty to lying to Congress about the extent and duration of those dealings.

For Mr. Trump, his first day at the summit meeting of the Group of 20 industrialized nations in Buenos Aires was a window into his idiosyncratic statecraft after nearly two years in office. His “America First” foreign policy has not become “America Alone” exactly, but it has left him with a strange patchwork of partners at these global gatherings.

Mr. Trump canceled a meeting with President Vladimir V. Putin of Russia, citing the country’s recent naval clash with Ukraine. Nor did he meet with Crown Prince Mohammed bin Salman of Saudi Arabia, though he did exchange pleasantries with the prince, whom he has pulled close despite charges that the prince had a role in the killing of the journalist Jamal Khashoggi.