Which one is correct?

did you go to the class yesterday? OR did you went to the class yesterday?

"did you go ... "

so the first option, right?

Yes.

The form "went" is simple past of the verb "to go." The simple past is not used with any auxiliary (helping) verbs ("did").

thank you so much.

You're welcome!

The correct sentence is: "Did you go to the class yesterday?" The second sentence, "Did you went to the class yesterday?" is grammatically incorrect.

To understand why, we need to look at the verb tense usage. In this case, the main verb is "go," and we're talking about an action that took place in the past, specifically yesterday. When using the auxiliary verb "did" for past tense questions, we should use the base form of the main verb after it.

Therefore, the correct form is "Did + base form of the verb," which gives us "Did you go to the class yesterday?"