Maybe only the port in which the Ethernet cable is plugged in is damaged. If you have other unoccupied ports in the switch, which are still functional, plug the cable in one of them.
If the Ethernet cable is fully functional and firmly plugged in on both ends (computer's and router's), but your computer doesn't recognize it, restart the switch by unplugging it from the power outlet and plugging it back in after a couple of minutes.
If the Ethernet port(s) of the switch is (are) dirty, the computer won't detect the Ethernet cable. All you need to do is to take a small piece of cotton (or a cotton bud), pour some isopropyl (rubbing) alcohol on it and clean the Ethernet port(s).
Note: If the indicators next to the port, which signal when a connection between two devices is established, don't blink after you have cleaned them, check out the other solutions.
If you don’t receive the email in the next 2 minutes please check your junk folder, and add [email protected] to your safe sender list.