Up to a certain point. Above that point, not only do you have to pay the tax to the foreign country in which you earned the money, but you also have to pay American income tax on that as well. I believe the cutoff is around $90,000.
You can choose to either take a foreign income tax exclusion (up to the first ~100k earned), and deduct income taxes paid beyond that point (like paying state taxes), or get a credit for foreign taxes paid.
So if you earn less than 100k, you need to file US taxes, but will only pay the foreign tax rate. If you earn, say 200k, then you’ll pay at least as much as the US would have taxed you on that income.[0]
There are still absurd pieces of this law: for instance, if you buy a home using foreign currency, then sell the home for the exact same amount, but the foreign currency became a lot stronger, you owe US taxes on the change in USD to your home’s value.