Consumer price index is about consumer goods. This is why tarrifs and such are considered regressive - they hit people harder the less money they have because a larger percentage of their spending is consumer goods.

If I invest half my income and spend half my income, and the prices of goods goes up 4.2% and my income goes up 4.2%, then I've made progress; I'm now investing more than half my income, because the half of my income I was spending has stayed even and the half I was investing has increased.