High ping TP-Link switch

Hello, recently bought a 5-port TP-link gigabit switch and connected two computers to it, and then a CAT 5e cable from the switch to router. I've been getting high latency on the computers randomly in games. Not sure what it could be cause it's not constant so it's hard to diagnose. Could be the CAT 5e cable I'm guessing. Or the switch behaving weirdly?

Latency going to 100+ms from 30ms

Please help hehe