Paying iPhone off early

I’m leasing 2 iPhone 7’s with T-Mobile. I have 7 & 9 more months left until my lease ends . My phone bill is $170 and I truly regret leasing it . I could’ve bought like 3 iPhones by now 🤦🏾‍♀️ lol so I was thinking about buying my phones out and wanted to know if that would hurt my credit ? I’m not sure if it’s considered breaking my lease or what ? I just wanna be done with the expensive payments so I can finally BUY the XR just to have a upgrade and I wouldn’t have to think about upgrading again for another few years cause it’s only 2 years old . . Any suggestions?