Is there a way to determine what mobile network frequency band is in use?
The LTE Discovery app can give you this information.

Incidentally, your specific situation is likely a result of the 5X supporting band 12, and the Z3 lacking it. This tends to be relevant in situations where reception differences are significant (one device with service, one without) because band 12 is T-Mobile's only low-frequency LTE band, meaning that it penetrates buildings better and will cover wider areas more effectively.