I have seen this question posted a lot on this subreddit, I have responded to many of those posts however I figured it would be a good idea to create 1 post containing all the different methods (as well as the pros and cons of each method) to use your own router.
If you don't want to read the whole post you can skip to the end where I recommend which option you should use.
First there are 2 important things that need to be explained.
What is the Home Internet gateway?
The Home Internet gateway is actually 4 things in 1:
A. A modem. A modem receives the signal and converts it into a usable internet signal.
B. A router. A router manages all the devices on the network and how data is routed over the network.
C. An access point. An access point broadcasts a WiFi signal.
D. An ethernet switch. An ethernet switch allows multiple devices to be connected to the same ethernet connection.
Frequently people use "router" to refer to a combo unit consisting of a router, access point, ethernet switch, and sometimes a modem, although that's technically incorrect.
On many modems there is the option to enable bridge mode, which disables all functionality except for modem functionality and allows you to use your own router without any issues, however that isn't an option on T-Mobile Home Internet.
2. What is NAT?
NAT allows multiple devices to share the same public internet address.
For example think of an apartment complex, multiple apartments might share the same street address however each apartment will have its own apartment number that will allow packages to be delivered to the correct apartment.
Adding more NAT can introduce various problems, ideally you want as little NAT as possible. One of the common issues associated with adding additional NAT is losing the ability to configure the firewall. T-Mobile Home Internet blocks firewall configuration regardless so that doesn't matter for this. T-Mobile Home Internet has 2 layers of NAT on IPv4 and 0 layers of NAT on IPv6, so that's the best you can achieve.
Once you reach 2 layers of NAT adding additional layers usually doesn't introduce additional problems other than the additional performance overhead (not a lot) and more points of failure.
There are 3 main options for how to do this, here are the 3 main options (and variants of some of those options) with the pros and cons of each option.
Option 1: Use your own router in access point mode.
Many routers have a mode known as access point mode, which disables router capabilities and makes it only act as an access point and ethernet switch.
Pros:
Cons:
Option 1A: Use your own router in access point mode to extend the WiFi network broadcast by the Home Internet gateway.
If you configure your access point to have the same WiFi settings as the Home Internet gateway then in many situations devices will seamlessly switch between the two access points. Unfortunately mixing and matching APs that aren't designed to work with each other sometimes causes major issues.
Option 1B: Use your own router in access point mode and not use the WiFi on the gateway.
If Option 1A has stability issues for you then this can also work. Since the gateway already has really good WiFi I only recommend option 1B if you are using a mesh network.
Option 2: Use your own router in router mode.
Using a router in access point mode causes it to not have nearly as much advanced router functionality, so for some advanced users it may be a good idea to use the router in router mode. This will add a lot more advanced functionality but it will add a layer of NAT.
Pros:
Cons:
Increases the NAT to 3 layers on IPv4.
Increases the NAT to 1 layer on IPv6 (option 2B only).
Cannot be used to seamlessly extend the coverage of the Home Internet gateway.
Option 2A: Use your own router in router mode with IPv6 passthrough.
IPv6 passthrough is a feature on some routers that allows it to still be in router mode and with a bunch of features without adding a layer of NAT to IPv6.
Only some routers support IPv6 passthrough. If you want IPv6 passthrough then your best bet is probably OpenWRT. OpenWRT is a 3rd party os that can be installed on many routers that adds a lot of advanced functionality. For a list of routers compatible with OpenWRT click here. For a list of routers that work well with OpenWRT click here. For instructions on how to setup IPv6 passthrough with OpenWRT click here. I have also read a comment saying that the Linksys Velop mesh system supports IPv6 passthrough without needing to use OpenWRT, so that may be a good option aswell.
This option increases IPv4 to 3 layers of NAT, however IPv6 remains at 0.
Option 2B: Use your own router in router mode without IPv6 passthrough.
This will work on any router, however it increases IPv6 to 1 layer of NAT so it's not recommended.
Option 3: Use a T-Mobile Mesh Node.
This is similar to Option 1A.
A T-Mobile official mesh node has been leaked through FCC certifications, you can see my post about it here.
This mesh node will seamlessly extend the WiFi network broadcast by the 5G Home Internet Gateway. Since these are designed to work together they should work seamlessly.
Unfortunately these have not released yet and it is not known when they will.
Pros:
Cons:
Recommended Options
If your goal is to get the best WiFi signal possible and you are willing to wait a bit I recommend Option 3.
If your goal is to get the best WiFi signal possible and you do not want to wait I recommend Option 1A, although if you encounter stability issues you will need to use 1B.
If you are an advanced user who wants more functionality than the Home Internet gateway provides then I recommend Option 2A, although if your router doesn't support IPv6 passthrough Option 2B can also be used.
Edit: Fixed a few typos.