I don't know why so many people immediately blame wifi, especially when you state it is a cable. LAN cables are known to have iffy connections on old laptops. when the connection is lost, Re-Seat the connection first. This simply means take the cable out of the connector and carefully plug it back in. (Do this at both ends.) If the cable has been connected for a long time, the pins inside may be loosing connection. A tech can examine the connector and maybe even tighten the pins to prevent this in the future.
If this continues, I would suggest borrowing or buying a new cable to see if perhaps the cable is the problem.
Lastly, Driver. Use Device manager and find the manufacturer of your LAN connector. Go to the manufacturer's website and see if there is an updated driver to download and install. (Be aware, there may no longer be an XP version for you to download. You may again need a tech to find you the proper driver.