Classifying groups of order 18

$\varphi(1)$ is an automorphism of $C_3 \times C_3$ of order $1$ or $2$. If it has order $1$, then you get the direct product $C_3 \times C_3 \times C_2 \cong C_3 \times C_6$, so let's suppose it has order $2$.

It helps to think of ${\rm Aut}(C_3 \times C_3)$ as the group ${\rm GL}(2,3)$ of invertible $2 \times 2$ matrices over the field of order $3$. An element of order $2$ has minimal polynomial $x^2-1$ or $x+1$ , so it has eigenvalues $1,-1$ or $-1,-1$. In either case, the matrix is diagonalizable.

So, we can find generators $t,u$ of $C_3 \times C_3$ (corresponding to eigenvectors of the matrix) such that, in the first case, $\phi(1)$maps $t \mapsto t$, $u \mapsto u^{-1}$ and, in the second case $t \mapsto t^{-1}$, $u \mapsto u^{-1}$. So there are two isomorphism classes of nontrivial semidirect products.