Tmobile submits the code to Apple if you meet the requirements in the link below.
If you meet the requirements then Tmobile puts in the request to Apple , so if you want to check
you can follow the link below on how to unlock your iPhone.
I have a iPhone 8 Plus and it locked I requested it unlocked and I want to know if it was done how do I go about doing that
If you purchased your iPhone from T-mobile, then you can call them or use the chat and provide the IMEI number and request the SIM unlock.
Then, you should receive a messasge telling you that your iphone has been unlocked. But you still have to reboot it.
How to verify ?
By inserting a different carrier's SIM card.
And then it will check with Apple servers if it can unlock the phone. SO you may need to have some wifi.
There you go, your iphone is unlocked.
In the future, help yourself, purchase it from Apple directly and save you the hassle of the SIM lock.
Carrier in US did not realize how much it's costing them to lock them...