By Rational Root Theorem, all rational roots of a polynomial are in the form $\frac{p}{q}$, where $p$ divides the constant term $6$ and $q$ divides the leading coefficient $1$. One such root is $-3$. Factor the polynomial by dividing it by $z+3$.
$$\left(z+3\right)\left(z^{2}-3z+2\right)$$
Consider $z^{2}-3z+2$. Factor the expression by grouping. First, the expression needs to be rewritten as $z^{2}+az+bz+2$. To find $a$ and $b$, set up a system to be solved.
$$a+b=-3$$ $$ab=1\times 2=2$$
Since $ab$ is positive, $a$ and $b$ have the same sign. Since $a+b$ is negative, $a$ and $b$ are both negative. The only such pair is the system solution.
$$a=-2$$ $$b=-1$$
Rewrite $z^{2}-3z+2$ as $\left(z^{2}-2z\right)+\left(-z+2\right)$.
$$\left(z^{2}-2z\right)+\left(-z+2\right)$$
Factor out $z$ in the first and $-1$ in the second group.
$$z\left(z-2\right)-\left(z-2\right)$$
Factor out common term $z-2$ by using distributive property.