Most operating systems for computers and mobile devices allow setting the preferred order of WiFi access points (APs). Keeping in mind risks of rogue APs, one may wish to keep open WiFi networks available while preferring more secure networks. Windows WiFi preference is configurable from the command prompt. MacOS allows simple dragging to select preferred WiFi networks. Apple iOS WiFi preference is similarly dynamic and user-configurable. Android has sophisticated WiFi network selection scoring that can be influenced by the user. Linux has several choices of WiFi network managers, most of which allow setting the WiFi preference order.
In general, consider using a full-time VPN for mobile devices and computers, especially when using WiFi that is not your known work or home WiFi network. Unused WiFi networks are a security risk and waste energy by beaconing WiFi SSID names the device has connected to in the past.
Delete infrequently used WiFi networks, especially “open” networks that are at highest risk for spoofing. Suppose a rogue WiFi AP exploiting zero-day flaws in the network stack or presenting a fake login page to glean credentials. The Pwn Pulse shows how much information can be gleaned from Bluetooth and WiFi in a commercial product.