Interest rates are low so a ton of money has been fleeing the bond market pumping stocks. It's not the companies getting more valuable, just more people entering chasing yield, reducing your earnings per share.
I think the current inflation is due to pandemic stimulus and will pass, but holding cash long term is never a good option. I think we will stay in a low interest rate period for a while (2030?), then to get out of it the government will inflate the currency. The justification for this is in the next crisis they won't have room to lower interest rates so they will print money instead. When this inflation occurs, holding debt is great because it gets inflated away. As well, real estate has traditionally kept pace with inflation, so it is a good place to park your money.
I personally just dumped a ton of money into real estate with this justification. I wasn't happy with how other investments looked. Obviously it depends where you are in life, if you plan to stay for a while, all that. Location also matters, LA real estate is a bit different from Baltimore. Right now debt is cheap and in the future it will get inflated away so that's what I'm banking on.
There are a lot of people dumping in cash, hoping to double their investments in a span of a couple years. Many are successfully doing this.
There is also a growing percentage of people who are being completely priced out of housing due to it becoming a wealth exchange among the rich.
Can housing prices keep growing infinitely with fewer and fewer actual people buying them? When the last recession hit, a lot of people thought no, it can't happen and things will level out from here on. It turns out prices did simply keep going up and up.
If you have rental housing you like, I think I’d wait (and I say this as someone who “owned” two different houses (owner-occupied). I owned (or bank owned and I slowly buy it from them) because I wanted to own. It’s been a net wealth creator, but I think by less than renting and dumping every extra amount that housing cost into S&P 500 would have been.)
The problem with considering the alternative as the S&P 500 is that for lots of people, money leaks out on the way towards the index fund and transforms into new cars and nice vacations and three decades later, they don’t have a paid-off house nor a fully-funded account with which to buy one and have money left over.