I’m not a legal expert on this topic but it’s my understanding that you’ve not incurred a debt at the cash register. You just haven’t made any transaction at all.
If the store was extending you credit (ie leave now with the goods and in the future pay us back) they’d be required to accept cash at that point.
There is no federal statute mandating that a private business, a person, or an organization must accept currency or coins as payment for goods or services.
(There are some specific local laws; generally though it appears not to be the case that you have to accept cash.)
Yet there is this curious clause in the US Constitution:
Article I, Section 10, Clause 1:
No State shall enter into any Treaty, Alliance, or Confederation; grant Letters of Marque and Reprisal; coin Money; emit Bills of Credit; make any Thing but gold and silver Coin a Tender in Payment of Debts; pass any Bill of Attainder, ex post facto Law, or Law impairing the Obligation of Contracts, or grant any Title of Nobility.
Variously interpreted, that part about states can't make their own currency may be tangentially important.
Why would it be important? This doesn't seem to be a case where a state is doing anything (it's shops), nor are the shops making their own currency (they accept payment in USD, the vehicle for that is just not physical paper).
If the store was extending you credit (ie leave now with the goods and in the future pay us back) they’d be required to accept cash at that point.