Taking into account the classic problem $ min_x | Ax-b | _2 $, What would be the iteration procedure to solve this?

In my case, I am solving a least squares problem for GMRES:

$$ min_x | H_n y- | b | e_1 | _2, $$

where $ H_n = Q_n R_n iff Q_nR_ny = b iff R_n y = Q ^ * b $. So I'm solving for $ y $ by replacing the back and then establishing $ x_n = Q ^ * y $. Now, however, I do not understand what should be modified in the next iteration. I tried to configure $ b = y $ in the next iteration, but that did not give a correct answer, even though the convergence occurred.

Can someone clarify?