Turning the car off and on again while waiting uses more fuel than leaving it on. This is because it takes more energy to restart the engine than to keep it running. When you turn the engine off, all of the pistons stop moving and the oil pressure drops. When you turn the engine back on, the pistons have to start moving again and the oil pressure has to build up. This all takes energy, which means that you use more fuel.
In addition, turning the engine off and on again can put extra stress on the starter motor and the battery. Over time, this can lead to these components wearing out prematurely.
So, if you're going to be waiting for more than a minute or two, it's best to leave your car running.