I believe it's paid as part of clearing customs. Since everything is in some capacity inspected (even if that just means checking the weight, container seals, and serial numbers in the freight container), that means there's some record of what's coming in and from where. At that point the importer pays customs the various fees and taxes before customs let's them take the goods out of the port of entry.
The importer would mark it down as part of the taxes that they paid on their purchase, but it would largely only matter so that they can appropriately indicate what portion of the purchase price was taxes that have already been paid so they don't double pay later.
The things that are cheaper to make in the US were already made in the US.
Because of the high cost of labor here, we tend to specialize in things where the unit cost is so high that the labor cost doesn't matter as much and spending extra for educated and skilled workers becomes a cheaper upgrade. Things like jet engine parts, engines, and machine tools.
Also things where you make a lot of them in an automated fashion, like precision screws and nuts or refined petroleum products. We're probably not making the plastic bags or chairs, but we would be making the giant tub of plastic beads used for the injection moulding, which is then shipped to Malaysia to be moulded, and then back to the US to be a deck chair.
The set of industries that are close enough to the line to make sense to move to the US and can be moved quickly enough for it to matter is vanishingly small.
It's why most of our exports have been intangible for so long.