All government spending is done by "printing money", at least in monetary sovereign countries like the US, UK, and other countries issuing their own cureencies. The government is the monopoly issuer of the currency and cannot run out of it, just like the scorekeeper of a baseball match cannot run out of points. Taxes are also not for funding the government, but for removing momey from circulation, precisely to curb inflation. (Also to drive the value of the currency by making people demand it to be able to pay their taxes).
Thus "printing money" isn't in itself inflationary, as long as the newly created money is spent on something where there is excess production capacity.
The question for the government is never "can we afford it", but rather "are the real resources there to achieve it".