Process $1$:
$$2x-1=0$$
$$2x=1$$
$$x=\frac{1}{2}$$
Process $2$:
$$2x-1=0$$
$$(2x-1)^2=0$$
$$(2x-1)(2x-1)=0$$
$$2x-1=0$$
$$2x=1$$
$$x=\frac{1}{2}$$
Why aren't we getting extraneous roots in process $2$?
Process $1$:
$$2x-1=0$$
$$2x=1$$
$$x=\frac{1}{2}$$
Process $2$:
$$2x-1=0$$
$$(2x-1)^2=0$$
$$(2x-1)(2x-1)=0$$
$$2x-1=0$$
$$2x=1$$
$$x=\frac{1}{2}$$
Why aren't we getting extraneous roots in process $2$?
You don't get extraneous roots because you're squaring zero. There is only one value that, when squared, gives zero. If you did it with a non-zero value, you would add extraneous roots, because there would be a second number that has the same square.
Because extraneous roots aren't necessarily produced by squaring both sides. They are produced by setting a sequence of logical implications instead of a sequence of logical equivalences. See examples in this answer .
In your case, it turns out that
$$\begin{aligned} &2x-1=0\\ \Leftrightarrow \quad&2x=1\\ \Leftrightarrow \quad &x=\tfrac{1}{2}\end{aligned}$$
as well as
$$\begin{aligned}&2x-1=0\\ \overset{*}\Leftrightarrow \quad&(2x-1)^2=0\\ \Leftrightarrow \quad&(2x-1)(2x-1)=0\\ \overset{**}\Leftrightarrow \quad&2x-1=0\\ \Leftrightarrow \quad&2x=1\\ \Leftrightarrow \quad&x=\tfrac{1}{2}\end{aligned}$$
In $*$ we can use "$\Leftrightarrow$" instead of "$\Rightarrow$" because $0$ has only one square root.
In $**$ we can use "$\Leftrightarrow$" without the restriction $x\neq\frac{1}{2}$ because $ab=0$ iff $a=0$ or $b=0$ (that is, we are not dividing by zero).
The other equivalences are straightforward.
By zero-product property we have that
$$A\cdot B=0 \iff A=0 \quad \lor \quad B=0$$
therefore
$$(2x-1)(2x-1)=0 \iff 2x-1=0 \quad \lor \quad 2x-1=0 \iff 2x-1=0 $$