Ekko deals massive damage but his ranges are relatively short and he has some high-ish cooldowns. Depending on what you're playing, your best bet is to play around his cooldowns, baiting his Q and trying to trade with his E up without letting him get his passive on you. Also, pay attention to both his W (the field, it's easy to dodge but you gotta pay attention) and the position of his ghost. In prolongued fights, he can get his ghost close to where he is so he ults and heals, reverting the damage suffered.
He is very weak against cc as well, he cannot cast E or R if he's snared which gives you a good window to burst him down.
In lane, just play around his cooldowns, he can't spam a lot because he runs out of mana relatively fast.
Also avoid getting hit on 3rd stack when he's harassing you. If he does he gets a free runaway and could easily evade punishment. He becomes very fast and you become very slow after he lands 3rd hit. And always avoid where his ult is standing. As he can ult back in anytime to nuke anybody
He is very weak against cc as well, he cannot cast E or R if he's snared which gives you a good window to burst him down.
In lane, just play around his cooldowns, he can't spam a lot because he runs out of mana relatively fast.
If you hear him use his shield/stun spell, move yourself away from the area, it is on a long cool down
Never run backwards to dodge his yoyo spell, always move left or right
If you are below half health late game he can kill you with one jump so be careful
Harrass him early game in lane to deny farm
Bait his q and dodge it to waste his mana
after ekko does his combo he is vulnerable for about 3-4 seconds
and last but not least, Simply Ban ekko. Even if you know how to deal with him, there are 4 people on your team who won't.