Foam in gas tank cause gas nozzle auto shut off before fill

Did someone make a habit of topping off the tank after the first time it clicked off? If so they may have damaged the vapor recovery system. Likely your owner’s manual makes note of this and there may be a sticker on your car warning you about this.