Ukraine is "paying the price" for the West's failure to understand the threat posed by Vladimir Putin, the PM says.
Boris Johnson told the BBC the Russian president's invasion had "already failed" because he underestimated the "strength of resistance" in Ukraine.
But he blamed European countries who "went back to treating [Putin] as part of the community" after his annexing of Crimea in 2014.
Mr Johnson has been visiting Saudi Arabia, discussing energy security.
He said the West needed to ensure it was "never again vulnerable to Putin's blackmail" - especially when it came to relying on Russian oil and gas.
But Labour criticised Mr Johnson for the visit, saying he was going "cap in hand from one dictator to another".
During his trip, Mr Johnson met Saudi Crown Prince Mohammed bin Salman for an hour and 45 minutes for talks about ending reliance on Russian oil and gas.
Afterwards, Downing Street said the UK and Saudi Arabia had "agreed to collaborate to maintain stability in the energy market" and boost renewable energy sources.
A spokesman added the two countries had also agreed to boost co-operation in defence, security, trade and culture.
However, a number of MPs had called on the PM to cancel the visit over the Saudi government's human rights record. Last week 81 men were executed in one day.
The prime minister insisted that he did not "turn a blind eye" to the incidents and raised them with the country's officials.
But he said he had to be "realistic" and "look at the global picture" when it came to energy security.
Failure to understand
President Vladimir Putin ordered the annexation of Crimea - a territory of Ukraine - in 2014. He subsequently backed an eastern rebellion by pro-Russian separatists, who have fought Ukrainian forces in an eight-year war that has claimed 14,000 lives.
Despite years of western sanctions, Russia remains firmly in control of Crimea, which it absorbed following a referendum vote discredited by much of the international community.
Speaking to BBC political editor Laura Kuenssberg, the PM said: "If you look back at 2014 and what happened when Putin took part of Crimea... what we totally failed to understand [was] the threat that he posed and we renormalized.
"European countries went back to treating him as though he was part of the community.
"Ukraine is paying the price for that now."
He also pointed to the strength of the resistance in Ukraine, adding that Mr Putin was committing war crimes in the country.
Mr Johnson said: "He won't be able to crush and conquer Ukraine, because they've shown fundamentally that they have an indomitable spirit.
"He's got to withdraw. He's got to close this thing down. He's got to take back his his tanks and his armour. And there's got to be as a solution that respects the will of the of Ukrainian people."
War in Ukraine: More coverage
After Russia began its invasion in Ukraine last month, numerous governments introduced sanctions to hit the country's economy.
And many countries - including the UK - pledged to phase out their use of the country's oil and gas to hit it even harder.
Mr Johnson said he planned to look to at solar, wind and to "make some big bets" on nuclear power going forward, but short-term solutions were also necessary.
"The UK has a historic and a long-standing relationship with Saudi Arabia, which goes back many, many decades," said the PM.
"That should not in any way stop us from raising issues of human rights."
He added: "I want to be clear, we don't we don't just turn a blind eye, we don't wink at them, we don't ignore it, we raise it and we make the argument.
"But what we also try to do is look at the global picture and look at the the impact on the world economy, and particularly the impact on the UK [as a] consumer of hydrocarbons.
"We're in a transitional phase now and we've got to be realistic about the continuing transitional importance of hydrocarbons in our in our economies."