Yes. Even in states where only gas station attendants are allowed to pump (I’m looking at you, Oregon and New Jersey!), there are little latch things on the pump triggers that let you walk away while it’s filling, and automatically shut off when the nozzle detects that the tank is full.