iPhones has a 1 year warranty from date of purchase.
You can use this to see if warranty still applies. Apple keeps a record of this kind of thing.
If you broke your screen or cause any damage deemed user error warranty will be voided.
Manage your T-Mobile account