Take the SIM out of the broken device and put it in any [T-Mobile branded or compatible unlocked] device.
If the SIM is a different size, you can get a SIM Adapter Kit to fit smaller SIMs to a larger SIM size. If you have a larger SIM and need smaller, go to a T-Mobile store to get a new SIM and transfer the line to the new SIM. There's a fee for a new SIM.
Manage your T-Mobile account