The rule is you have to use a continuous tense after the conjunction 'while' because it introduces the longer of two simultaneous actions, as in
The phone rang while I was having a shower.
And if both actions are long ones, you should normally use two past continuous tenses, as in
She was doing the shopping while I was looking after the kids.
But... that is without taking into account the Anglo-Saxon obsession with concision!
It is possible, instead, to simplify the above sentence and write
She did the shopping while I looked after the kids.
In fact, you only need to use a past continuous for the longer of two simultaneous actions in the past time. If the two simultaneous actions in the past time are the same length, even if they are long ones, you can use two past simple tenses!
The reasoning goes this way: you have to use a past continuous after 'while', so 'I looked' is in fact an 'I was looking' in disguise. But you can only do this if the two actions are the same length, so 'she did' is also a 'she was doing' in disguise.
All this for the sake of writing or saying one word ('looked', 'did') instead of two ('was looking', 'was doing')!
The trouble with English is that its users keep trying to simplify it! And explaining how they make their sentences simpler can sometimes be... complicated!
For the sake of politeness, I wrote 'concision', but, to me, it verges on... laziness! Just think of 'ain't'!