When she _____ dinner, her husband came home. (was making) or (had made) [closed]

I think they are both grammatically correct. The first example is better than the second example, but you probably wouldn't say either sentence because the word "When" isn't specific enough to communicate the intent.

In the first example, "While" is a better word to indicate that she was in the process of making dinner when her husband came home.

While she was making dinner, her husband came home.

In the second example, "After" is a better word to indicate that she had finished making dinner when her husband came home.

After she had made dinner, her husband came home.