Which one is correct and why

When did you bought the sim card?


When did you buy the sim card?


The auxiliary verb "do" is followed by the bare infinitive (which is the same as the base form of the verb).

"She goes" becomes (in an emphatic statement) "she does go" (so, "does" is inflected for person and number, but "go" is a bare infinitive).

It becomes, in the negative, "she doesn't go", and in a question, "does she go?". In the past, "did she go?".

Hence, if you want to ask when someone bought a SIM card, you have to ask "When did you buy the SIM card?".

Not the answer you're looking for? Browse other questions tagged or ask your own question.