They have more money to spend so they buy a higher value product, or pay more rent on a better house or flat
That would only apply if the price of the products, house purchase or rental payment has risen since it was last used to calculated the CPI. The CPI measures the over all percentage increase in the cost of the goods in the 'basket' over a period of time, a month, quarter or year. The fact that a consumer might choose to buy a more expensive product/ house/ rental has nothing to do with how inflation is calculated if the prices of these items remain the same as they did when previously used for the calculation.
^ On the other side if employers have to pay higher wages they have to increase their prices, which also adds to inflation.^
This is one of those simplistic ideas which gets repeated without regard to the evidence. Suppliers of goods and services have other ways of absorbing increased wage costs and research evidence shows that price increases are not an automatic response to wage increases. As Wwmk2 points out.
Inflation is caused by shortage of resources available for purchase, as we saw with the response to energy shortages caused by the war in Ukraine. Even so, in that instance, it also demonstrated that monopoly suppliers are not above profiteering in shortage situations. Energy companies made record profits over the 2022 /23 period.
Inflation can be caused by too much demand for resources in short supply (too much money chasing too few goods) but does anyone seriously think that applies in a situation where a significant portion of the population has no spare money?
If it's any consolation, jut think that the increased wages for the rail workers and for public sector workers will be spent into the domestic economy where they will help to sustain businesses. Thus keeping others in employment and contributing to GDP.
And, of course, a significant amount of the money will return to the government by way of direct and indirect taxation, thus increasing tax revenue...