Android Q will include more ways for carriers to SIM lock your phone
9to5google.com
9to5google.com
When I wanted to unlock my iPhone, I was able to go to my carrier's website, pay a small fee and have it be unlocked over-the-air. I wanted to do a similar thing to a Galaxy S6 Edge that I got from them before selling it and I was notified by their site that I will have to physically take it to a store to have it unlocked there. I did that and all they did was come up with loads of surcharges and BS hoops to jump through -- essentially saying that getting that phone unlocked would cost me like 6-8x as much as the iPhone for made-up reasons.
The simple solution is never let the phone contact the internet or the phone network with the default ROM.