Hi @zento ,
Things to check to try and isolate the problem:
Try a different Ethernet cable just in case it is the cable/cable connector that is the problem.
Check that it is not the router/modem Ethernet port connection that is the problem by trying another port.
Check using a magnifying glass and a strong light that the pins in the laptop’s Ethernet port housing are all straight, not bent and that there is nothing lodged in the port enclosure preventing a good electrical connection.
Try using the laptop in [https://www.digitalcitizen.life/4-ways-boot-safe-mode-windows-10/|safe mode with networking] and check if the connection remains stable.
Here’s the [https://download.lenovo.com/consumer/mobiles_pub/legion_y540-15irh_pg0_hmm_201904.pdf|hardware maintenance manual] for the laptop. Go to p.45 to view the necessary pre-requisite steps and then the procedure to remove the systemboard. This will allow you to check if the Ethernet port connector is securely mounted on the systemboard.