Also, apart from your personal self-interest, every dollar you spend in cash is a vote for it to continue being accepted. This is important because there's a minority of people who are excluded from the financial system and depend on cash. For example: undocumented immigrants, sex workers, tax protesters, victims of identity theft, protesters who have had their bank accounts frozen [2], and people who, for inscrutable business reasons, are deemed too high-risk to have bank accounts [3]. If those were the only people who used cash, companies would probably not care to accept it anymore. But the more people continue to use cash on principle, the longer it will remain as an escape hatch for those who need it.
[1] https://www.nytimes.com/2019/11/04/business/secret-consumer-...
[2] https://www.bbc.com/news/world-us-canada-60383385
[3] https://www.nytimes.com/2023/11/05/business/banks-accounts-c...