If one action marks a single point, use when; if two actions overlap, use while: When the lights went out, I grabbed a torch versus While the soup simmered, I chopped onions.
- Point at the moment one thing happens and you'll say when: When she waved, we stopped. Draw a line covering the whole stretch and you'll say while: While we waited, snow fell.
Pick your situation
Picture this: you're telling a friend about last night's dinner prep, and the phone rings while the sauce is simmering. You'd say While I was cooking, the phone rang. The cooking fills the background; the ring lands inside it.
Narrating a chain of single moments? Use when: I called her when I got home. The calling marks one point in your sequence of events, not a span of time.
Telling a story where one event finishes before the next begins? Use when: When the show ended, we left. The leaving follows one completed moment.
Describing two activities that ran side by side? Use while: While she was studying, her brother watched TV. Both actions cover the same stretch.
Setting a scene as background for a surprise? Use while for the ongoing part: While we were hiking, it started to rain. The rain interrupts the longer action. This pattern is common but not the only use.
Careful: if the 'background' action is really a quick step in your sequence, switch to when: When the kettle boiled, I poured the tea. Saying while the kettle boiled would suggest a longer stretch than you mean.