A hero’s welcome awaited President Volodymyr Zelensky of Ukraine on his first trip to the United States after Russia’s full-scale invasion, which came on the heels of two back-to-back military advances that showcased Ukrainian momentum to the West. Mr. Zelensky spoke to a joint session of Congress last December, highlighting the successes and appealing for continued aid.

Mr. Zelensky’s second visit, beginning on Tuesday, is a more delicate political mission, coming in the face of skepticism over assistance to Ukraine from some Republican lawmakers and amid a slow-moving and so far inconclusive counteroffensive on which many hopes in the war had been pinned.

Mr. Zelensky will attend the U.N. General Assembly meeting in New York, where he is expected to continue an effort to win support among developing nations that have wavered or leaned toward Russia. Then he will travel to Washington to meet with congressional leaders and visit the White House.

The Ukrainian president is approaching his appearances with a more balanced message. He remains a tireless advocate for military assistance for the Ukrainian Army, but has infused his pleas with deep expressions of gratitude for what the West has already provided.

It’s a shift in tone and approach for Mr. Zelensky after criticism that he was scolding his allies and appearing ungrateful as he pressed them for weapons.

At a NATO summit in July, Ben Wallace, then Britain’s defense minister, said, “Like it or not, people want to see a bit more gratitude.” He said he was offering advice for Ukraine to win over those who have been skeptical of aid.

At the same summit, in Vilnius, Lithuania, Jake Sullivan, the Biden administration’s national security adviser, said that “the American people do deserve a degree of gratitude” for ammunition, air-defense systems, armored vehicles and mine-clearing equipment.

Mr. Zelensky appeared to get the message.

“Thank you so much,” he said in a brief comment during Secretary of State Antony J. Blinken’s visit to Kyiv this month, in which Mr. Zelensky said thank you eight times.

“We are really thankful. We are very thankful,” he said.

Last December, Mr. Zelensky arrived in Washington just weeks after Ukraine’s military had defeated Russian forces in the only provincial capital they had seized in the full-scale invasion, Kherson, in the country’s south. Earlier in the fall, Ukraine had sprung a successful surprise attack on Russian forces in the Kharkiv region in the northeast, recapturing towns and villages across a wide swath of territory.

The gains meant that Ukraine had reclaimed about half the territory Russia seized in the invasion that began in February 2022.

Ukrainian forces at the time were also fiercely holding off the Russians in Bakhmut. (The Russians eventually captured the city in May). In his appearance before Congress, which drew a standing ovation, Mr. Zelensky presented the Democratic congresswoman Nancy Pelosi and Vice President Kamala Harris with a Ukrainian flag signed by soldiers fighting in Bakhmut.

At the time, preparations were already underway for the military operation that began in southern Ukraine this June, after a monthslong wait for American and European weaponry, including tanks and armored vehicles. Mr. Zelensky has complained that the delay gave Russia time to dig in and lay vast minefields, thwarting any fast advance.

Other factors added to the delay, including late spring rains, but the Ukrainian government’s evolving argument was that the West’s hesitation over sending more powerful and sophisticated weapons was costly in terms of the counteroffensive’s effectiveness.

Ukraine’s army is now locked in a plodding but vicious and bloody fight along two main lines of attack through farm fields and tiny villages.

Military analysts have not written off the operation, but even Mr. Zelensky has said it is moving slower than hoped. This month, Ukraine pierced a main line of Russian defenses near the village of Robotyne and is fighting to widen the breach sufficiently to send through armored vehicles.

At home, Mr. Zelensky remains politically popular though he has hit some speed bumps, including corruption in military recruitment offices and procurement that led to the firing of his defense minister.

After nearly 19 months of war, the vast majority of Ukrainians remain enraged at Russia for the invasion and deeply opposed to any settlement that would leave President Vladimir V. Putin with any gains from the assault.

In addition to lobbying the United States and Europe for military aid, Ukraine has been seeking diplomatic backing from developing countries in Africa and South America, arguing that disruptions in grain shipments are raising food prices. He also wants to shore up support from military allies, of which the United States is most pivotal.

America provides about a third of direct weapons donations to Ukraine’s army. Since Russia’s full-scale invasion, Congress has approved approximately $43 billion in security assistance.

Now, the White House has requested from Congress an additional $24 billion in Ukraine aid that seems likely to become entangled in partisan spending fights this fall. Mr. Zelensky will have an opportunity to try to unite Democrats and Republicans on the need for continued military assistance.

Looming over Mr. Zelensky’s visit is the American presidential election, just over a year away. The prospect of a second Trump administration, and a less enthusiastic commitment to aiding Ukraine, is a concern to leaders in Kyiv.

“It’s a different kind of conversation” for the Ukrainian leader in Washington as the United States moves into an election year, Igor Novikov, a former U.S. policy adviser to Mr. Zelensky, said in an interview. The president will try “to keep the substance of the war on the agenda and not alow it to become domestic political pingpong, because it’s a matter of life and death.”

With Ukraine bubbling up as a domestic political issue in the United States and European nations, Kyiv will need to engage politicians opposed to Ukraine spending, Mr. Novikov said.

Ukrainian politicians of all viewpoints have said the country’s national interest lies in maintaining bipartisan support for U.S. aid. Mr. Zelensky met in Kyiv over the summer with former Vice President Mike Pence and has regularly hosted Republican members of Congress.

In Washington, Mr. Zelensky also intends to argue that America’s interests are served in defending Europe’s borders in Ukraine, according to an official in the president’s office. Otherwise, the war could spread, destabilizing the European Union, which is the United States’ largest trading partner.

In the run-up to the invasion, Russia stated claims to security influence in Eastern Europe more broadly, demanding that countries admitted to NATO after the breakup of the Soviet Union leave the alliance.

“If Ukraine were to fail, Putin would be emboldened with profound security and economic effects for the United States and average Americans,” said the official, who insisted on anonymity because he was not authorized to speak publicly about Mr. Zelensky’s visit. “We will reiterate that Americans should never have to fight Russians in Europe, and the best way to secure that is Ukrainian victory.”

Mr. Zelensky also intends to lay out in private conversations Ukraine’s plans in the war, the official said, to assuage worries that the fighting could bog down in the back-and-forth battles of recent months along the front. Ukraine has scored some success in long-range strikes on Russian air and naval bases and this month damaged a landing ship and submarine in the port of Sevastopol, in occupied Crimea.

Still, a key goal, the official said, is to deliver “a huge message of gratitude to the president, Congress and the American people.”