This is a good point. The government really shouldn’t be producing a single number and saying that’s “the” inflation rate. It muddies the waters and makes it easy to think that the economy is some magic system where things just happen rather than the sum of choices by individual companies and consumers.
If OPEC decided to stop producing oil altogether you bet there would be “inflation” caused by oil prices but that doesn’t mean the FED should be goaded into making changes to policy.