This article shows how to provide immediate feedback during a Google Form using Response Validation.
Immediate Feedback in a Google Form using BRANCHING
You can provide immediate feedback in a Google Form using the Branching/Go to Section option to allow students to retry the same question.