There are gas stations that don’t allow customers in after a certain hour (maybe 10pm on weeknights and midnight or 1 on weekends, if that).
They have a tray/door that allows cash to trade hands, credit card receipts to be signed, and Red Bull, cigarettes, and chips to be dispensed (like at a drive through at the bank).
Gas station attendants have it real easy now. As a teen, I worked as an attendant, mostly graveyard hours midnight to 8 am and on weekends, mostly as the only attendant on duty. My boss had me carrying a .32 revolver in my pocket, illegal to do so but I was glad to have it on me. Especially since a lot of transactions were cash. Did the cash register, besides checking oil, water, and wiping windows. When I did that, the gun would sometimes bump against fenders while using the squeegee on the windshield. Lucky I never had to use the gun.