Contrary to the standard model that does not admit topologically nontrivial solitons, two Higgs doublet models admit topologically stable vortex strings and domain walls. We numerically confirm the existence of a topological $Z$-string confining fractional $Z$-flux inside. We show that topological strings at $sintheta_W = 0$ limit reduce to non-Abelian strings which possess non-Abelian moduli $S^2$ associated with spontaneous breakdown of the $SU(2)$ custodial symmetry. We numerically solve the equations of motion for various parameter choices. It is found that a gauging $U(1)_Y$ always lowers the tension of the $Z$-string while it keeps that of the $W$-string. On the other hand, a deformation of the Higgs potential is either raising or lowering the tensions of the $Z$-string and $W$-string. We numerically obtain an effective potential for the non-Abelian moduli $S^2$ for various parameter deformations under the restriction $tanbeta=1$. It is the first time to show that there exists a certain parameter region where the topological $W$-string can be the most stable topological excitation, contrary to conventional wisdom of electroweak theories. We also obtain numerical solutions of composites of the string and domain walls in a certain condition.