How much does each type of spend contribute to the CPI?

Not all your costs are weighted equally when calculating the CPI. The weights have changed a lot since the CPI was introduced in 1960 (and backdated to 1948).

In 2023 food, housing and transport made up 50% of household inflation. But in 1960 the cost of food contributed twice as much and health costs weren't even figured in the calculations