We have $$\left|y\right|=x $$$$\Leftrightarrow y=x \text{ or } y=-x. $$ Now consider this $$y=\left|x\right| $$$$\Leftrightarrow y=x \text{ or } y=-x .$$ Hence $$y=\left|x\right|\Leftrightarrow |y|=x.$$
That is both the equations are equivalent. But when I plot the graph of the equations I don't get the same graph:
The black curve represents $y=\left|x\right|$ and the blue one $\left|y\right|=x.$

Your claim $$y=\vert x\vert\iff y=x\mbox{ or } y=-x$$ is false: for example, if we take $y=-2, x=2$ then the right hand side is true but the left hand side is false.
The right equivalence is $$y=\vert x\vert\iff [y=x\mbox{ or }y=-x]\mbox{ AND }y\ge0.$$ Note that each side of this equivalence displays a clear $y/x$ asymmetry. This asymmetry means that, when we swap $x$ and $y$, we should expect the graph to change, and indeed it does.
As a coda, an equation which is equivalent to "$y=x$ or $y=-x$" is $$\vert y\vert=\vert x\vert.$$ This is symmetric in $x$ and $y$, and at this point you should be able to guess what its graph is without actually plotting it.