Implicit in the other comments and answers on this page is the fact that solving an equation means to find its solution set. This initially may sound tautotlogical or belabouring the obvious, but hear me out.
Now, you wouldn't agree that $\{0,4\}$ is the solution set of $$2x-6=0,\tag1$$ and would protest that it contains one extraneous solution. However, this working is perfectly mathematically valid: $$2x-6=0\\(2x-6)x=0x\\(2x-6)x=0\\x=0\;\text{or}\;3$$ sumarising the above: as $x$ varies, if $2x-6=0$ is satisfied, then $x$ can equal only $0$ or $3.$
(To be clear: the conditional's converse is not being asserted.)
At this point, we can validly assert that $\{0,4\}$ is the candidate solution set of equation $(1).$
What's going on is that when our chain of logic is tacitly purely forward—as is typically the case—obtaining an equation's actual solution set sometimes requires pruning the candidate solution set that you have created, which happens when your choice of method introduces a "non-reversible" step (e.g., the first one above).
But all is not dire: as long every step in your presentation is a true statement of the form Step X implies Step Y
(this includes the first step above), requisite solutions never accidentally get discarded. So, given an equation, every candidate solution set contains every possible solution.
Please refer to this answer for a more concrete explanation.