In the case of a single endogenous variable and a single instrumental variable, the IV estimator is given by
$b_{IV} = \frac{cov(z,y)}{cov(z,y)}$$b_{IV} = \frac{cov(z,y)}{cov(z,x)}$
It is often mentioned that "the instrument should not affect the dependent variable directly, but only through the endogenous variable". But if the instrument should not affect the dependent variable directly,
$cov(z,y) = 0$
would hold, making
$b_{IV} = 0$.
So what is happening?