ELI5: How do gas nozzles know when your tank is full?

It's not when the tank is full, but when the gas reaches the nozzle. It has a return line for taking back the vapors (inflammable). I think when the return line is blocked/ takes any liquid, it instantly shuts off.