Really need some advice, Gifted an iphone. Trying to find a solution so I can use it!

I need to know what my options are with this phone. I was given an iPhone XS Max, and after further inspection and digging, I find it is locked to ATT because the person who initially had it ALLEGEDLY owes $$ on it somehow. The person that gave it to me is no help, I even told him Id pay it off (depending on how much was owed). I originally wanted to unlock it and either put it on Straight Talk or Metro by Tmobile.
Is there any way I can find out how much is owed to AT&T to unlock it and pay it myself?
Could I possibly just get prepaid ATT service and port my number over to ATT? Would the phone work for me then?
Is DoctorSIM's Premium AT&T Service a legit thing?