Question Formation Steps
Original Sentence:

They sang songs.

Step 1: Add 'did'

Did they sang songs?

Step 2: Change verb to base form

Did they sing songs?

Question Pattern:
graph LR A[Did] --> B[Subject] B --> C[Base Verb] C --> D[Rest of sentence] D --> E[?]
Past Simple Base Form Question
wrote write Did he write?
sang sing Did they sing?
had have Did you have?