Mr Zelenskyy said Kyiv was ready to strengthen ties with London, a key military ally after former prime minister Boris Johnson made support for Ukraine a key policy of the past year.
Mr Sunak became prime minister with a number of crises competing for attention. Mr Johnson left office on the back of ethics scandals and rising inflation that was then made worse by Liz Truss’s mini-budget, which was removed quicker than she was.
“Congratulations to Rishi Sunak on taking office as British Prime Minister!” Mr Zelensky wrote on social media, saying he hoped Mr Sunak would be able “to successfully overcome all the challenges facing British society and the whole world today”.
“I'm ready to continue strengthening the Ukrainian-British strategic partnership together!”
Mr Sunak has vowed to help Ukraine fight even as he warned of difficult financial choices ahead for his government.
Speaking outside 10 Downing Street minutes after being appointed prime minister, Mr Sunak called it a “terrible war that must be seen successfully to its conclusion”.
French President Emmanuel Macron congratulated Mr Sunak and said that he would look to work with him on common challenges such as the war in Ukraine.
“Together we will continue working to tackle the challenges of the moment, including the war in Ukraine and its many consequences for Europe and the world,” he said.
Irish Prime Minister Micheal Martin called on him to urgently start talks with the EU on resolving an impasse over post-Brexit trade rules for Northern Ireland.
“Building on work already under way, there is a real opportunity for the EU and [the] UK to find jointly agreed solutions on the issues pertaining to the [Northern Ireland] Protocol, and I urge Prime Minister Sunak to move quickly to substantive engagement with the EU on that basis,” Mr Martin said.
The EU is counting on a strong relationship with Britain in full respect of the agreements made after its departure from the bloc, European Commission President Ursula von der Leyen said.
US President Joe Biden said at a White House Diwali celebration on Monday that Mr Sunak's appointment would be a “groundbreaking milestone, and it matters”.
One of the first messages came from India's Prime Minister Narendra Modi on Monday, congratulating Mr Sunak as Britain's first Hindu prime minister and also its first of Asian descent.
“Warmest congratulations, Rishi Sunak!” Mr Modi said. “As you become UK PM, I look forward to working closely together on global issues and implementing road map 2030.
“Special Diwali wishes to the ‘living bridge’ of UK Indians, as we transform our historic ties into a modern partnership.”