Take out some cash. Cash-free living may be harder for visitors than for residents, although it depends a lot on your spending pattern. As a visitor, your spending pattern is different than as a resident, and you might do some things that some residents who have lived cash-free for years rarely or never do. You may need more cash more frequently than a resident, or less frequently. Some examples of when I needed cash as a visitor follow. The situation may have changed, so I added timestamps.
When I was visiting the USA for a workshop in May 2019, most workshop participants would fetch lunch at food trucks parked out in the street. Some food trucks took cards, most didn't. I seem to recall one Nordic participant sought out those food trucks that took cards because he had no cash at all.
When I was on vacation in Texas in December 2014, there was a major power outage and shops were without electricity. At this time they accepted only cash. Unlikely, but can happen.
Some urban transit may be de facto cash only, exact change only. Perhaps there are machines where you pre-pay a ticket electronically, but not at your stop. Perhaps most commuters use a transit card you don't have. Note that I have experienced this in Sweden as well (Summer 2012, Luleå).
I took a long-distance bus in California in May 2013, payments (which were in the order of $50) were cash only (Eastern Sierra Transit Authority, Bishop CA to Reno NV, incidentally the technically worst bus I've ever been on, very old, very noisy, no seatbelts). They also didn't issue any receipts so I could not claim this money back from my employer.
When I entered the US by a land border in 2014, I had to pay cash.
It also happened at least once to me (I think Iowa 2013) that my Swedish Visa Electron card wasn't working in a restaurant, I didn't have enough cash, the in-store ATM didn't take my European card, and I had to run to a nearby bank to get cash.
Note that even if you can live cashless, per-transaction fees for many payments with a Swedish card may accumulate, and it may be cheaper to use cash for small payments. Check how your foreign transaction fees work: is it strictly a % or is there a per-transaction fee as well? With my Dutch card, I paid at least €0.15 (IIRC) per POS transaction, which is OK when paying $50 for groceries or restaurant but wasteful when paying $1 5 times a day for small items. If all your costs are reimbursed this is SEP.
Apart from carrying at least two sufficiently different payment cards, I would recommend to carry at least some cash as a backup, probably the amount for a restaurant meal. Electronic payments can fail, and not everybody accepts them.