Each row tries one exponent and compares the power with the target.
Try one exponent per row
Each row computes g to x modulo p, then compares the result with y.
The first row misses
At x=1, the value is 5, not the target 8.
51mod23=5
The next row also misses
At x=2, the value is 2. The search continues.
52mod23=2
Summary
A miss row is still useful: it rules out that exponent and moves to the next one.
rows tried so far=2