Run new cable.
You can get a few feet of ethernet, plug one into the modem, the other end into your computer and see if that works. Keep it for a few days. If that works but going back to the existing cable you can guess the problem is an existing bad cable.
You can get a few feet of ethernet, plug one into the modem, the other end into your computer and see if that works. Keep it for a few days. If that works but going back to the existing cable you can guess the problem is an existing bad cable.