Mobile Phone Country Confusion

We just got back from a long vacation in Spain. Three weeks to be exact. When we landed at JFK neither of us had cell service. No signal even as we went through the terminal. Got on free WiFi and after sifting through the misinformation, it seems to be a thing. Here is what seems to happen. The phone looks for signals of the frequency of the country you have been in recently, but somehow won’t fall back and look for US signals. Looked everywhere for a reset. Rebooted the phone. Left it off for a while. Eventually called T-Mobile. After three levels of support and lots of trial and error, we found the magic reset. Under System –> Reset Options –> Reset Wi-Fi, mobile & Bluetooth. Now we are back.