In 75% of the US one gets ahead within 3 years by buying a home vs continuing to rent.
Typically, and historically, it was kind of understood that it takes about 3 years to see the advantages of owning instead of renting. The first years, most often, it seems a lot more expensive, and you do not see yet the tax advantage, when there is one. Then you settle in and start feeling "at home" vs leasing you space in life, and that adds to the financial aspects of the question.
But now that prices have moved a lot and in different ways throughout the US, it is not so straightforward. In short, where prices have fallen the most would be where it is most attractive to buy, vs to rent.
This study from Zillow gives more detailed information on the new quirks and wrinkles of this age-old quandary.
Current Mortgage rates