“I didn’t know” is correct sentence.
or “I didn’t knew” is grammatically incorrect because did or didn’t is always follwed by present form of verb.
Grammar rule: did + V1
‘did’ can never be followed by a past tense or past participle of a verb; it is always followed by a present tense. Here are some examples:
- I didn’t know (not ‘knew’)
- I didn’t do it (not ‘did’)
- I didn’t write it (not ‘wrote’)