You go inside and pay cash to the clerk who authorizes $20 of gas on pump #5.
I'm in Oregon where we (mostly) legally can't pump our own gas. There may be pumps that are like vending machines: they take cards or cash.
There are exceptions, like if you're in the rural areas (counties under 40,000 residents). They also changed it for a while during the early part of COVID.
I notice that the pumps still run the commercials on the pumps here. Probably cheaper to just build one model of pump even though Oregon and New Jersey but it would drive me crazy if I was pumping gas for a living.