Prices go up because wages go up, and wages go up because prices go up. Which seems like it can't possibly be the explanation, and while it is of course a simplification, it really is surprisingly accurate.
Inflation is mostly there so that people can keep getting raises and doing better than they did yesterday, without actually moving forward. It's kind of like the Shepard tone. Always infinitely seeming to rise in pitch, but never actually doing so. Or if you are unfamiliar with that reference, it's like a stairmaster. Those stair based exercise machines. You constantly go up a set of stairs that is constantly moving down at the same speed.
Each step feels meaningful, but by the time you are ready to take your next step, you are relatively exactly where you were before. You constantly have more and more money over the course of your life, and to a small degree by the end of a long career you should actually be a little bit ahead if everything went well for you, just in time for you to retire and remove your higher than average salary from the pool to offset someone else gaining a raise that is slightly ahead of inflation.
This is of course all a gross oversimplification. But it's the "slightly accurate model" first step, that leads to learning all the rest in actual depth that changes some of the specifics by a tiny bit if you look closely enough.