In an interview with the Financial Times, external, Trump warned the Nato military alliance faced a “very bad” future if it members failed to help.
He also reiterated his calls for allies to help protect the Strait of Hormuz, saying: “It’s only appropriate that people who are the beneficiaries of the strait will help to make sure that nothing bad happens there.”
The president has previously urged the UK, China, France, Japan and South Korea to send ships to secure the route.
Sir Keir stressed that any action would not be a Nato mission but “an alliance of partners”.
Pressed over whether he was refusing Trump’s demand to commit the Royal Navy to protecting the strait, Sir Keir said the UK was “looking through the options” but highlighted there were already minehunting systems in the region.
Asked about the state of the UK’s relationship with the US, Sir Keir insisted the two countries were “strong allies” but added: “It is for me to act in what I consider to be the best interests of Britain.”
A German government spokesman said the war “has nothing to do with Nato”, adding that it was an alliance to defend territory.
Defence Minister Boris Pistorius said there would be “no military participation” from Germany, although Berlin was prepared to support diplomatic efforts to protect the strait.
“What does Donald Trump expect from a handful of European frigates in the Strait of Hormuz that the mighty US navy cannot manage alone?” he added.
This was echoed by former head of the British military, Gen Sir Nick Carter, who said Nato was designed as a defensive alliance.
“It was not an alliance that was designed for one of the allies to go on a war of choice and then oblige everybody else to follow,” he told the BBC.
EU foreign ministers are meeting to discuss how to protect the channel.
Speaking ahead of the meeting, the bloc’s foreign policy chief, Kaja Kallas, said one option would be to change the mandate of the EU’s naval mission in the Red Sea
She argued this would be the “fastest” way to boost security in the region.
Conservative leader Kemi Badenoch said: “It is not clear the prime minister has been involved in the planning process. All of our allies seem to be worried about how slow he is.
“I’m worried that he’s not deep enough in conversations with the US. But before we start sending ships out [to the Strait of Hormuz], we need to know what the plan is.”
The Liberal Democrats have argued the UK should not send ships to help secure the strait and instead focus on de-escalating the war.