They were / are making more, there's masks piled up left and right everywhere I go. But it took a while for the production to get up to speed. Many factories converted to making masks, and within weeks after the start of the 'rona outbreak in the west they were churning them out by the millions per day.
But there was some inertia. Most of that stuff is made at scale in the East (speaking in very broad terms), which takes a few weeks to ship to the West. Some would have been made 'over here', but not that much.
Another factor was testing that the masks are up to spec. In hospitals etc they would be hesitant to get masks from a company that used to make other textiles if they haven't been vetted for the production of medical or N95 masks yet.
And a final factor was simply fuckery with companies vs government contracts. Plenty of companies offered that they could or had made masks to the various governments (I'm thinking of NL and the UK at the moment), but said governments did not go for it. Instead, they funneled billions to shell companies that only existed for a few weeks, placing orders for millions of units of PPE. On new companies. With a postal address at best. That did not have production plants.
I hope there will be / there is a big investigation and anyone that was involved in funneling billions to these shell companies, I presume for personal gain, get put away for a long time.