Most stores aren't going to be able to sell you anything with no power, regardless of taking card or cash, because sales need to go into a database via a register, update inventory, etc. Sure a few small family run businesses, maybe restaurants, might be able to take cash, but almost no chains will be able to run and that's most stores in most places.
In Canada, the Rogers network went down in July 2022 for several hours which caused debit card transactions to fail (after the outage, Interac said it was going to add a SECOND network provider - *facepalm*). Many businesses which relied on the Rogers network for credit card transactions were also affected.
"Small business owners were among those hardest hit by the outage, which left them unable to process debit card payments.
Sharif Ahmed, the owner of Plantforsoul plant shop in Toronto's west end, said the outage left him feeling helpless, as he turned away customers who didn't have cash."
Home Depot has a backup generator or battery in order to still allow transactions to go through in the event of a power outage. It even ran the air conditioning. They stored the payments offline until they were able to connect online again.
What I've seen happen more often is that there is a network error and digital payments can't be processed for hours. Digital money relies on a lot more complex infrastructure than just electricity.
In my country it's required for cash registers to have a backup power enough for 48h of outage. We don't get outages that often (probably once a year or so) but the requirement is there.