You only lose (real) wealth via inflation if 1) you hold currency directly, or 2) you hold assets that are notionally defined and inflation is not sufficiently account for in the notional definitions.
So if you hold fiat currency directly in a non-interest bearing account, or in cash under a mattress, then you get hurt by inflation (1). Or if you hold bonds, or a savings account (2), whose interest rate is not large enough to compensate for inflation (particularly unexpected inflation), you will lose real wealth.
But note that these are not as big a problem as most people think. Generally, we do not hold our wealth in currency (1). Although it works acceptably as a store of wealth (and very well as a transaction medium), the opportunity cost is usually so high it is a poor asset over a long period of time, even if there were no inflation. For example, unlike dollars, gold has not lost money to inflation over a long period of time. However, if you held your wealth in gold, you would not have invested it in real estate, or the stock market, or a local franchise, etc. and so the real comparison that should be made is not gold versus dollars but rather gold versus any of the other things you could have invested in.
And (2) is much less of a problem because typically when we write notional contracts we account (as best we can) for inflation. So bonds during periods where inflation is expected to be high will have high nominal returns, and during periods of low inflation they will have low nominal returns.
Most people will not hold their wealth in a currency, such as dollars or bitcoin or gold, but rather, use those currencies to make transactions (ie. purchase goods and services, or temporarily as they sell one asset and buy another), and put their wealth into productive assets. The value of productive assets is not dependent on the value of the currency that they are denominated in, but rather, in the short run, the simple supply and demand for that asset, and in the long run, on the share of the total economy (across all currencies and denominations) that the asset is able to command.
If in 20 years, if some company such as Google controls 50% of the total productive capacity of the entire globe, then it doesn't matter if you sell 1/1,000,000,000,000 of the company in dollars, euros, yuan, or bitcoin, the relative value of those currencies will be balanced to reflect 50% * 1/1,000,000,000,000 of the world's GDP.