Will iPhone X from TMobile A1865 or A1901 work globally?
According to https://www.techwalls.com/iphone-x-models-a1865-a1901-a1902-differences/ you better buy A1865 which works globally:

A1865
The iPhone X A1865 is considered the global phone as it works on both GSM and CDMA networks. This phone is also available as a SIM-free factory-unlocked version at Apple Store
A1901
The iPhone X A1901 is the GSM version. It is available on AT&amp;T and T-Mobile in the United States, as well as many other Europe and Asia countries.