It does seem pretty shocking that rates for a 30 year fixed mortgage surpassed 7% for the first time in 20 years. I wonder how many people putting those news headlines on blast remember 1981 when 30 year mortgage rates went as high as 18.6%.
To answer the original question, how raising interest rates stifles inflation: it's about supply and demand. When too many people want to buy something in limited supply, such as a place to live, prices rise. It's one thing if prices rise on a "discretionary" item not essential for survival. When the basic cost of living rises well above average wage gains then that's a problem. A whole lot of buying is done with borrowed money. Making it more expensive to borrow money it brings down demand and slows down price hikes. Or even reverses the price hikes in some cases.
The Federal Reserve has only a limited number of tools to combat inflation, such as changing its lending rates. The policy has worked many times in the past, including the late 1970's to early 1980's period when the Federal Reserve had to go completely nuclear on interest rates. Inflation was getting out of control in the late 1970's and threatening to go into a destructive spiral where the US Dollar would just get de-valued.
The situation today is far more complicated. It's probably going to take more than just interest rate hikes to calm the turmoil in the economy in the short term. There are problems that are deep rooted and structural that threaten to turn into stubborn, long term problems. Cost structures in housing, health care, day care and some other essentials are not sustainable. Certain job sectors are experiencing severe labor shortages in part because those jobs don't pay a survivable wage at all or at least in that specific location of the country. Wages have been rising in some job categories, but overall not as fast as rates of inflation on food, fuel and rents.
Cranking up interest rates often comes with the side-effect of sparking a recession and job losses. In past growth vs recession cycles job losses were usually recovered and then some in following periods of growth. For much of the 1980's the American economy boomed following the deep recession at the end of the 1970's.