I've spent a lot of time researching and considering whether buying or renting is better for me, and so far I've come away renting every time.
However, there's one important caveat to this which I think you failed to address in your story: the real investment of buying a home is the long-term savings on money spent on a place to live. When you own, in essence your rent is fixed for the life of that loan. Of course some other things can increase like repair costs or property tax, but over time, when you own your home, your housing expenses go down. So when you've lived there for 10 years, those unexpected repairs really do become a rounding error, cause what's another $1k when your monthly housing payment is $1k less than if you had continued renting?
Anyways, in this market, it's often not a good idea to buy simply cause prices got so out of control during the pandemic, but once prices stabilize, the math will shift back again.