This whole "government printing money" framing is very wrong.
The government was printing money and it led to tremendous growth. In other words, the economy was able to absorb the money which meant the money printing was absolutely appropriate.
However, we had several external supply side shocks due to the pandemic, and Russia's war on Ukraine, which drove the cost of goods higher. Since the US government cannot really stop Russia from killing civilians in Ukraine, or force China to get rid of its zero COVID policy, or single handedly fix the logistical breakdowns in all the shipping lines, etc, it has to rely on the only tool it has, which is cooling the economy. In essence, it's solving a supply chain shock with a demand side response, because that's all it controls.
In fact, the fact that the Fed had kept interest rates low and "printed money" meant that it has a lot of leeway to actually tackle this situation right now without causing too much pain. After several significant increases, the target rate is still 1.5-1.75, which takes us back to what the Fed had reduced it to during the peak of the 2008 crisis.
Which means that thanks to its policies, the Fed still has a lot of room to help control inflation without causing too much pain, something which wouldn't have been possible if it had prematurely raised rates earlier.