Some supermarkets have two output buffers after a checker, seems easy to offer to pay just as the person in front finishes or to wait around a little to pay for the next person.
You might also just pass 5 to 10 x 20 USD cash (or local equivalent) to the cashier and have that applied to the next person in line, and let them work out how to split any leftovers on their own.
I've never done either of those things myself, but I did feel horrid enough about our government during an extended shutdown over budget stuff to directly support the food bank with some 'staples' from Costco as well as a just outright cash donation back when that BS happened last.
Directly supporting the food bank is also an option that can help the even more needy.