It should be unlocked already. The reason why your sim may not work is the network settings may still be for Verizon and not T-Mobile. Have you tried network resetting the device with a T-Mobile inside. Have you tried backing up the iPhone and using iTunes to factory reset?
I was going to try and reset it, but there’s a reatriction code that I have to put in that I don‘t remember making. So having troubles on that side as well.
It should be your pin number, or your password for you iCloud account. If you forgot your password you can try logging into icloud on your computer, and just say forgot password and setup a new one.