If your computer will not connect to Ethernet first reset your modem and router by turning them off for 30 seconds.
If this does not solve the issue, try turning off your wi-fi.
Left click the Wi-fi icon.
Select your wireless network and disconnect from it.
If disconnecting from your Wi-Fi network causes you to no longer have Internet access, unplug your Ethernet cable, plug it back in and try connecting again via Ethernet.
If this does not solve the issue re-install your Ethernet adapter. To do this, type in Device Manager into your Windows search bar and open the Device Manager.
Next right click on Realtek PCIe GbE Family Controller under Network Adapters and select uninstall device,
After this it may restart the computer/prompt you to restart to complete the re-installation, OR, it will just uninstall the drivers without needing to restart
If the process requires a restart, the drivers will be automatically re-installed when the computer is booted back up. If the process does not require a restart, click on the Screen and Magnifying Glass button at the top of the window. This will rescan for the software and automatically reinstall it.
If this does not solve the issue try resetting your modem and router again and if that doesn't work the issue could be your Ethernet cord itself. Try a different Ethernet cable if you have one and when you plug it in, plug it into a different port on your router.