Yes, in most countries there's a cash layer of the economy that cards never reach: street food stalls, wet markets, small neighborhood eateries, local buses, tuk-tuks or shared taxis, temple donations, small guesthouses, and much of rural life generally. Even in largely cashless countries, flea markets and tiny vendors can be exceptions, and in some places vendors accept only a domestic mobile payment app, which is effectively the same as cash-only for a visitor whose foreign card won't link to it.
How big this layer is depends entirely on the destination. In some countries it's a rounding error; in others it's most of daily life outside malls and hotels.
The habit that serves you well everywhere: carry a modest amount of cash in small notes at all times, top it up when you're in a city with good bank ATMs, and never head to a rural area, island, or market day assuming you'll find a working card terminal or ATM when you arrive.