If your phone is not a t-mo branded USA phone you probably do not have wifi-calling. If you do have wifi-calling it can mess with wifi connections whether you are trying to use it or not. Where are you? (if you DO have a US phone there is something else we can check).
So you CAN connect to some networks?
You might try clearing the system cache. (check the t-mo link above on how to do this). It will not wipe out your apps and data.