I have an old, 09 HP Notebook laptop and it's been through a lot. It needs it's battery replaced and it's just really old. I was wondering if it has anything to do with connection lag. I've been getting a lot of lag switches in Minecraft and it's just really annoying. I don't know what the problem is. If you know what I can do to fix it, tell me. I still want you to answer the question though if the laptop has anything to do with it.
Can your laptop be the reason for bad connection lag in games?
Try connecting to a lan cable if the issues still persist then it's either your laptop or your internet, that eliminates possible Wi-Fi issues. Last possible way to rule out laptop would be to bring it to a friend/relative's house to try their net, once again if it lags it's your computer. Try turning down graphics it doesn't look like it but minecraft can use a lot of resources especially if you like to blow stuff up like me.
High graphics settings/low available vram can cause your vram to run out, which can either result in game crashes, or lag. There could also be a problem with your Wi-Fi chip in your computer, though this usually results in being unable to connect to the internet outright, or limits your receivers range to like 35 feet (some Sony computers were released with bad Wi-Fi chips, guess who got one of the defective ones? Lol)
My best guess is you are either having net problems with your router or isp, or you're running oyet of use able ram and is causing your pc to bog down.