Mortgage rates are based on bonds and bonds are having a tough time in the past few days. Bonds such as US Treasuries often benefit from terrible things that happen around the world--anything that calls economic growth into question or that increases geopolitical risk in a significant way.
The situation in Ukraine definitely ticks both those boxes, and that's why rates had been lower than they were at the end of February. But bonds also care about inflation, and unfortunately, the war and associated sanctions are also having a very big impact on things that are likely to affect inflation.
If you've seen gas prices or heard about surging commodities prices in the financial markets, you are already aware of the situation. Gas/oil are required to move "stuff" and people. That makes goods and services more expensive (aka "inflation"). Because bonds such as Treasuries and mortgages are repaid on fixed terms, rising inflation makes them less valuable for investors.
Think of it like this: if you buy a bond for $100 and receive interest payments over time of $110, you can buy $110 worth of "stuff." Inflation means that $110 buys less stuff in the future than it does today. To compensate for this, investors demand higher rates of return so that they can still buy $110 worth of "stuff" when it costs $120 in the future.
All that to say that while the Ukraine situation does indeed drive demand for bonds, the associated inflation implications are simultaneously pushing demand away (or at least pushing that demand toward higher rates/yields). The net effect today was a move back up to the highest mortgage rates since early 2019 with the average lender quoting 4.25% or more for a top tier conventional 30yr fixed scenario.