While sitting in a non-moving line (such as a bank or railroad crossing or gas station), is it better to turn off the engine or leave it running? Say you are in a non-moving line for 30 seconds, or 2 minutes, etc.
Constantly shutting off and restaring an engine results in shorter starter/battery life. It’s up to you to decide if it’s worth the few cents of gas burned while idling over the early replacement of the components.
Leaving the engine running while refueling is a dangerous habit.