What is the relationship between mortgage rates and inflation?

Many people view inflation in terms of the rising cost of fuel, groceries, electricity, and other goods and services. Mortgage rates may appear even less related to inflationary pressures. However, a connection exists between the two. The correlation between the trends of inflation and mortgage rates is evident from their patterns. By comparing their respective historical graphs, we can see that mortgage rates and inflation tend to move in tandem. Inflation is a self-reinforcing cycle; the longer it persists, the more pernicious its consequences become, and increasing mortgage rates are an unfortunate consequence. The fundamental concept is that mortgages behave similarly to bonds: when inflation and purchasing power increase, interest rates must rise to maintain investor interest. The Federal Reserve is the central bank of the United States; however, it does not directly regulate mortgage interest rates. Instead, it regulates the interest rates that banks charge each other for overnight loans to fulfill reserve requirements. Therefore, when the Fed raises its rate, mortgage lenders tend to follow suit, as was the case in 2022 after the Fed increased its federal funds rate by 0.25 percentage points in March.
Reference: See here