You can invest to stock, gold or Bitcoin, depends with your choice. You don't need to worry if you're need money in hurry, because you can sold it for instant, so you can use the money you invested for emergency needed.
However your savings will always be there and inflation can only affect some percentage of it and not the whole capital.
In conclusion, you can save and also invest.
Indeed, both are good, I just find it funny how many people brag that they only have one investment and no savings. They believe that investment will help them create more wealth while saving not only does not create more wealth, but inflation eats away at their money. They said it was not wrong, but they ignored the risk when investing, in addition to the profit, the risk is something we can encounter. Inflation is causing money to depreciate, but it won't fall as quickly as investments. If someone saved in 2022, their wealth would only lose a few percent of its value due to inflation, but if someone invests in bitcoin or stocks, their wealth may lose around 30-50 % value.