That's the issue. Since it's not a phone purchased from Tmobile/Sprint you will need to contact the seller from Ebay to see if they can unlock it for you. It’s been many years since it was purchased off of Ebay. But it was a new Sprint phone. It wasn’t a used phone. .
Xfinity can't unlock the phone if it's a Mobile branded phone so you will need to meet the requirements in the link below. https://www.t-mobile.com/responsibility/consumer-info/policies/sim-unlock-policy The phone was originally bought on Ebay and was a Sprint phone. Then of course Sprint eventually was taken over by T-Mobile. I’m thinking this might be the problem.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.