This happens a lot on unstable connections.
I would try restarting my Modem/Router,
checking QoS (quality of service) using my router's settings page,
or a speedtest website.
I'd also check any ethernet cables.
They could be slightly loose or damaged.