By the way, in US do federal and local governments give a preference to locally manufactured products in government purchases?

The federal government does. It was signed into law in 1933[1].

[1]https://en.wikipedia.org/wiki/Buy_American_Act

Anecdotally, most federal vehicle seem to be from national brands. State and local government there doesn't seem to be much a consistent policy.