Cash accounted for nearly a fifth of transactions in 2023, with people making smaller purchases, the British Retail Consortium said.