If the signal is weak unless you're sitting near your modem, check it out on someone else's wifi. (You're probably using wifi calling because the TMobile signal is weak.) If it's weak on some other wifi, it's your phone - the antenna got disconnected or the radio is bad. In either case, it has to go into the repair shop.
If it works with another wifi, it's a bad modem - call your internet provider (most people use the providfer's modem) and ask where to bring it for replacement. (Or pay over $100 for them to bring you a new one, in most cases. It's cheaper to stand on line for a while.)