My playmate explained it was because I was X character and Y character has Z ability and I needed to switch to V character when I respawn to counter their abilities
With all due respect, your playmate knew jack shit. Particularly in Overwatch, the “countering” is a combination of personal skill and situational awareness: you can win with any character against any other one, by just using the right abilities at the right time from the right place.
It’s also mainly a team based game… or used to be… so which character you pick is much less important, than knowing which synergies you can get with your teammates. That one does take time to learn, on everyone’s part, but a well synergized team can only be “countered” by another well synergized team.
For reference, I’m part blind, and some of my favorite kills are Mercy vs. Widow, or Torb’s ballistic rivet headshots across half the map vs. whoever thought they were well behind cover.