Even if you’re in this condition, you need to be saving something just to build an emergency fund. Also, if your company has a 401k program, contribute at least 1% to that. Anything is better than nothing.
I am retired. My biggest concern is hyperinflation. I have a hedge to cover it.
In a perfect world, investing will keep up with inflation, like you say. You just have to be willing to take the risk to maximize returns. Everything has risks, even saving.