The issue with inflation is one of expectation (trust me, I'm an experienced Argentinian) and usually government triggered a long time before any of its effects are noticed.
There is some lag on the cause-effect chain and most people are rational about making their pricing decisions. Price fixing doesn't work and hasn't worked in ~1700 years so far (see https://en.wikipedia.org/wiki/Edict_on_Maximum_Prices ), I'm preemptive about this, because it's the next logical suggestion. It doesn't work.
Back to inflation.
It usually starts with a monetary phenomenon (e.g. stimulus checks, increased public spending, etc. or extra savings due to lockdown), that causes demand driven inflation once that extra money starts to circulate (there's supply driven inflation too, like the GPU card shortages, but that is easier to revert).
Essentially there is more money available than the economy really needs. So the money to goods+services balance is wrong, so money is worth less.
Remember, inflation is about the value of money, not the value of goods. Goods' "worth" are relatively stable (with some notable exceptions such as commodities).
This devaluation of money causes protective behaviors on a production chain, you start pricing your stuff based on the expected value of money (you typically think about the replacement cost of your raw materials and labor, etc. rather than money itself).
Since you're playing with the future, it's uncertain, so you play it safe, and add some extra margin to the prices just in case inflation gets worse.
See where this goes? This composes and tends to accelerate inflation. On pathological cases it ends up in an inflationary spiral that ends in full economic collapse (see https://es.wikipedia.org/wiki/Hiperinflaci%C3%B3n_argentina_... - Spanish only - )
Usually the best way to stop it is to just cause a recession by drying up all that extra money. Once crap stops selling and the margins start to dry up, competition (on a healthy market) will drive prices down, but, again it will be slow.
The inflationary loop has lag, it takes a while to accelerate and it also takes a while to slow down.
It's scary to lower your prices when you expect high inflation, so once you turn the spiral on, slowing it down is painful for everyone, much more so for those of limited means.
I like the phrase: "Inflation is a tax on the poor" and is mostly monetary. The rich know how to protect themselves from it.