Although cashless payments are increasing in Mexico, cash use remains essential, but It’s not just in this country that I carry cash. When I’m going abroad I always pack two credit cards, (just in case one’s declined for any reason), along with some cash.
One simple recommendation: Avoid solely carrying large bills or dollars, you may encounter a situation where a taxi driver is unable—or refusing—to make change. Also, never assume a taxi accepts a credit or debit cards.
There are many instances in Mexico where only cash will do: local independent convenience stores, open-air markets, ambulant vendors, street food, parkings, anything in small shops and stalls (in rural towns and villages), paying your domestic help (e.g. maid, gardener, pool maintenance)... but the majority of routine jobs —especially urgent works (like fixing a major leak)— are strictly on cash terms.
Tolled Roads: Since January 2019, payment booths on tolled highways across Mexico only accept cash or electronic toll-booth tags in the windscreen; debit and credit cards are no longer accepted.
Save your wallet, save the environment, save the whales!