Most public Wi-Fi is fine for browsing. The risk is the network you can’t see being run by someone watching what passes through. The safer move for sensitive things (banking, logging into email) is your phone’s own cellular data, or your home network.
Unknown USB ports are a smaller, real risk. A port can be wired to read or push data, not just deliver power. Carry your own cable and plug into a wall outlet you trust. If you must use a public USB port, a small adapter called a data blocker passes power but not data.