I bought an iPhone 8 from a relative and it hasn't been paid off, can I still connect it to another carrier?

I bought an iPhone 8 from a relative and it hasn't been paid off, can I still connect it to another carrier?

Added (1). t mobile to metro pcs

Check with T Mobile. Presuming it's on a contract, you will probably have to pay a cancellation fee and the remaining part of the contract before they'll let you. If you don't I expect they'll put a block on the IMEI and you won't be able to use it with anyone.

Its not so much if it has been paid off or not, its whether or not it is unlocked. It sounds like it isn't so no you wouldn't be able to.