At a media conference aimed at easing public concern over rising costs, Starmer said the impact of the war would "define us for a generation" and could be similar to the increase in energy prices in the 1970s.
Starmer outlined plans for another summit with the European Union in the coming weeks that he said he hoped would undo some of the "deep damage" done by Brexit.
"It is increasingly clear that as the world continues down this volatile path, our long-term national interest requires closer partnership with our allies in Europe," Starmer told reporters in Downing Street on Wednesday.
Trump on Tuesday again criticised European countries that refused to join the war against Iran, calling out Britain and France, as trans-Atlantic relations deteriorate from the conflict that has driven up energy prices.
The president warned Britain and other countries to "start learning how to fight for yourself" because the US "won't be there to help you any more".
After Trump was elected in 2024, Starmer tried to position himself as a conduit between Europe and the United States.
But their relationship has publicly deteriorated over Starmer's refusal to join the US-Israeli war on Iran.
Starmer initially denied a request from the US to attack Iran from two British bases, but later agreed to allow what he calls defensive missions aimed at protecting residents of the region, including British citizens.
Asked about Trump's criticism, Starmer said "the US and UK are close allies and have been for a very, very long time" and he would act in the British national interest "whatever the pressure on me".
Starmer sought to reassure Britons about the Middle East crisis and its impact on the cost of living, saying that "no matter how fierce this storm, we are well-placed to weather it" and "we have a long-term plan to emerge from it a stronger and more secure nation".
He said he was not prepared to let the British people to relive the energy shocks of the 1970s.
Starmer did not announce any new policies to help households with soaring energy and fuel costs, but he did say that Britain would this week host meetings with allies aimed at opening the Strait of Hormuz, and 35 countries were now involved in efforts.
Foreign Minister Yvette Cooper will host a meeting of the group later this week to assess diplomatic and political measures to reopen the Strait, the prime minister said, but he acknowledged it would not be easy nor immediate following de-escalation in the conflict.
with PA