AIUI (but IANAL), the bit on bills that says "Legal tender for all debts, public and private" means that if you owe someone $5, and you hand them a $5 bill, then you have discharged your obligation. If the other person doesn't accept cash, too bad; you tried to pay what you owe, and if they don't like cash, they can't demand that you pay by check, or in Euros, or whatever.
What it doesn't mean, though, is that a business can refuse to deal in cash. If a shop wants to be paid before they make you a latte, that's not a debt, and they can demand that you pay electronically or not at all.
So while AFAIK (again, IANAL) cashless businesses are legal in the US, I personally don't like them because that's a form of discrimination against poor and homeless people. Plus, cash is more private.
Many big corps went cashless during covid. I worked for Vail ski resorts last winter and they only accepted card. Employees were not allowed to accept cash. One of my coworkers got fired for taking cash and putting charges on his own credit card for points lol. Really weird policy and I agree it should not be allowed.