I'm not 100% sure flashing the device will work as that's not something we support here. The best recommendation we can offer is to make sure it supports the T-Mobile network bands & technologies . You can also check the APN settings to make sure they're up to date. Since the Wi-Fi calling feature on device's T-Mobile sells is integrated into the software, it's hard to say if it'll work on this phone. I've heard of some folks being able to use it just fine but it can be hit and miss.
Head on over to the Note 9 section of XDA Developers. There are dual-SIM ROM's that will make your device fully compatible with T-Mobile and lots of great walk-throughs to guide you through the process.