Cash and credit cards are both good ways to pay for things
Visa and MasterCard are fairly widely accepted. AMEX and JCB are the next tier in terms of acceptance. UnionPay is also accepted in major malls and touristy places
In major cities like Taipei, Taichung, Tainan, Kaohsiung, credit cards are accepted by almost all hotels and grocery chains. Also, any shops, restaurants and entertainment venues you visit within inside malls are almost guaranteed to accept them as well
Smaller shops may or may not accept them, I'd say roughly 50/50 split. In smaller cities you'll have more businesses that don't accept them.
Night markets and other street vendors almost never accept credit cards. Same for public transportation and traditional taxi. Uber is obviously credit card-based
Bottom line: you can get by in Taiwan with only credit card, especially if you limit yourself to only major cities. However, cash is still needed to maximize your experience in Taiwan. I recommend having 1000-2000NT cash on hand at all times