Some of what you say makes sense, but the US is arguably the wealthiest country in the world, and has a moral obligation to make the world a better place. The last epidemic with similar world-wide effects as COVID-19 was the Spanish Flu, a century ago. Embassies, indeed, are not in foreign countries for the SOLE benefit of their citizens, but they should provide benefits to their citizens when essential, and COVID-19 warrants that!
The Chinese government took care of their citizens in Thailand, and also benefited Thailand when the Chinese donated (I think) 500,000 doses of vaccine, stipulating that their citizens be vaccinated. The French government vaccinated their citizens 55 years and older, and those with underlying conditions. Kudos to both countries!
A conservative estimate of the COVID-19 deaths around the world is 4.2 millions! Knowing how politicians obfuscate, I take those figures with several tablespoons of salt! I think that in such a situation, the US is morally obligated to provide vaccines to its citizens abroad!