Based on the IRS (federal EV credit) 8936 form, there are no restrictions on where you may buy the car. https://www.irs.gov/pub/irs-pdf/i8936.pdf
Per the 8936 form instructions, the following requirements must be met to qualify for the credit:
* You are the owner of the vehicle. If the vehicle is leased, only the lessor and not the lessee, is entitled to the credit.
* You placed the vehicle in service during your tax year.
* The vehicle is manufactured primarily for use on public streets, roads, and highways.
* The original use of the vehicle began with you.
* You acquired the vehicle for use or to lease to others, and not for resale.
* You use the vehicle primarily in the United States.