Yes, it was chaos. We arrived in India just after - the availability of new bills was erratic, just look for the ATM with a lineup. (worse, IIRC it was anything 500 and over, so about $2.) You couldn’t exchange more than a certain amount of rupees, You needed a bank account, so foreigners like those hippie backpackers were SOL. Try to imagine the news which was showing those white tourists busking and panhandling in India…
Worse, I saw an estimate that a significant percentage of US foreign currency in circulation is counterfeit.
The purpose of India’s recall was to flush out the hordes of cash which they believed was fueling an underground (untaxed) economy.
The whole point is, if you’re Ruritania (or Zimbabwe or Argentina or Nigeria who have had trillion-denomination bills) you just print money. The USA and most western economies do what their Fed says and limit the expansion of the money supply, so they only print a certain amount of money according to Fed guidelines.
Instead, the government operates like any other business, issuing bonds and using the money from those bonds.
And as others have been pointing out, the amount of actual cash is an insignificant amount compared to electronic money. Think about it… We have retirement savings approaching $1M - depending on how you count my pension entiltement (fund the company runs) well over a million. I have a line of credit of tens of thousands if I want money. Credit card limits over $10,000. etc. etc. Yet for actual cash in my pocket, I have about $400 - $300, a fairly high amount, because my wife got reimbursed for an employee event, and maybe $150 or more in collectibles, like a $100 bill from 1960’s and some obsolete $1 and $2 bills and older versions of paper money. I pay my monthly bills online without touching any real cash.
I suspect, unless someone middle class has real credit problems or doesn’t trust banks, their story is similar. Even retail, especially after the epidemic, is more credit and debit than actual cash. The Fed can change the “money supply” far more easily, quicker, and to more institutions with a few waves of a mouse than by printing cash.
So the quick answer for the OP is - the government does not just print money. They let the Fed manage electronic money. They let supply and demand at retail banks determine how much of that is converted to hard cash for consumers, and swap that to the treasury for electronic cash so as not to grow the money supply excessively.