We know that,
$$\begin{align} a&=\frac{\mathrm dv}{\mathrm dt}\\[3pt] &=\frac{\mathrm dv}{\mathrm dx}\cdot\frac{\mathrm dx}{\mathrm dt}\\[3pt] &=v\cdot~\frac{\mathrm dv}{\mathrm dx} \end{align}$$
According to this equation, whenever velocity is $0$, acceleration becomes $0$ as well.
However, we know that this is not always the case.
For example, when we throw a ball upwards, at its maximum height, its velocity becomes $0$ but the acceleration is non-zero ($g$ downwards).
Can someone please help me understand what is wrong in my approach?