The EU did the same and they were also the ones funding the BioNTech/Pfizer vaccine.
But I agree with your other comment about the US. The EU should have done the same. Restrict all exports to other countries until x million is delivered domestically.