You do good things because they are good, not to be thanked. It's so bizarre to frame saving lives as something that requires reciprocation.
I want my country to pay for these programs because they save lives and my country is rich enough to afford it. The way people talk about this stuff so amorally is incredibly off-putting.
When you constantly get villainized for being involved, that makes it a lot harder to justify to the populace that these things are worth doing. People actually do listen, but not always in the way one intended. At this point, is it any wonder that much of the populace is now convinced that non-involvement is the moral choice? (And I say this as someone who fears this state of affairs)
The idea that people did not thank the US is laughable.
I have literally met Japanese people who have been thankful to the US for dropping nukes on them while pissing themselves about North Korea having missiles. The difference is that they perceived the US as an enlightened hegemony, and this is in part because of the relative pennies spent on Africa.
Incidentally, There is an animated series called Gasaraki with an endearingly simplistic and worshipful view of the US that aligns with how they viewed the US, especially at the end.
Good luck with AI hunter killers replacing good will.