Modern Hyundai vehicles support both Android Auto and Apple Carplay, but which USB ports can you use on the vehicle for this purpose?

The rear USB ports are for charging only. To hook up your phone for Apple CarPlay or Android Auto, use the front in-dash USB port.
Connecting Wirelessly
Its not possible to connect Android Auto or Apple Carplay wirelessly on third generation or earlier models of Hyundai Tucson, but the fourth generation (2020+) does support wireless connectivity.