Read John 8:6 Using Other Translations
This they said, tempting him, that they might have to accuse him. But Jesus stooped down, and with his finger wrote on the ground, as though he heard them not.
This they said to test him, that they might have some charge to bring against him. Jesus bent down and wrote with his finger on the ground.
They were trying to trap him into saying something they could use against him, but Jesus stooped down and wrote in the dust with his finger.