We say that $x$ is congruent to $y$ modulo $z$ when $$x\equiv y\pmod z \iff x \pmod z = y \pmod z$$
Another definition is $$\quad x \equiv y \pmod z \iff \exists k \in \mathbb{Z}: x - y = k z$$
Why are those definitions equivalent? The second one says there exists $k$ such tkat $x=y+kz$. It means $x \pmod z = (y + kz)\pmod z$ = $y$. And conversely, if we write $y$ as $y=x-kz$, then $y \pmod z = (x - kz)\pmod z$ = $x$. So $x$ and $y$ are congruent if they are equal.
Where's the mistake in my reasoning? And how to prove the two definitions are equivalent?
I think the mistake in your reasoning $(y+kz) \pmod{z}$ in fact equals $y \pmod{z}$ (which may not equal $y$); and similarly for $x-kz$.
To show the definitions are equivalent:
The first definition says that $x$ and $y$ leave the same remainder upon division by $z$. So $x=zq_1+r$ and $y=zq_2+r$ for some integers $q_1,q_2,r$ with $0\le r<z$. Then $x-y=z(q_1-q_2)$, and so the second definition holds.
Conversely the second definition says that $x-y=kz$; and so if for instance $y=zq+r$ (division algorithm), then $x=z(q+k)+r$, which is the same remainder. So the first definition holds.