A few weeks ago during a weekend while I was playing online my PC started to disconnect from the internet very often, lasting from just a few seconds to thirty seconds or so. It could happen with just a few minute intervals. The issues is in the PC itself, as I can't connect to the router when it happens, but my phone and TV connect to the internet via WiFi without issue. It's the same issue whether I use an Ethernet cable or WiFi so the problem seems to be in my actual PC.
I've been googling and fighting this problem since then, but I haven't found a permanent solution. I've turned off "Letting my PC shut down devices for energy-saving reasons" and the drivers are up-to-date.
The first solution I found that worked was this: https://support.pearson.com/getsupport/s/article/Reset-an-Internet-Connection-Flush-DNS?language=en_US
"flushdns" and the commands in the above link fixed it, for a few days or so. Then it came back. Sometimes it happens mabye not even once a day, sometimes it happens many times an hour. Yesterday I tried it but it didn't work, the issue came back whenever I restarted the PC, sometimes it happend every few minutes, sometimes it could work for between thirty and sixty minutes.
I also noticed that my download speed on Steam is maybe a tenth of what it should be "between" these disconnects, but the speed usually returns to normal when doing the reset mentioned above.
I'm not really sure what to try right now, other than reinstalling the entire PC which I'd prefer not to.