
"that to cook dinner" isn't correct.
possible
...the first time that he cooked dinner.
?

Correction:
"that to cook dinner --> that he cooked dinner.
"that to cook dinner" isn't correct.
possible
...the first time that he cooked dinner.
?
Correction:
"that to cook dinner --> that he cooked dinner.