Turn off power management first.
If the problem doesn't go away,
Then we can troubleshoot and see if you have a bad lan cable, router, network switch or a bad network connector
Assuming
windows 10
Setting>System>power and sleep>sleep. Never
Go to device manager & your network adapter (ethernet or wireless, whichever you use )
Properties>power management>uncheck all the
computer to turn off this device to save power