My internet connection intermittently becomes very selective. Existing game sessions and Discord voice chat usually continue working, but websites, YouTube, and most online services—including game login servers—stop connecting. If I close an already-running game, I usually cannot launch it again until the problem clears. I use Windows over Wi-Fi through the ISP-provided modem/router from First Media in Indonesia. The issue has been happening for about a year. During an outage, pinging 1.1.1.1 and 8.8.8.8 still works with no packet loss and roughly 39 ms and 33 ms latency, and nslookup successfully resolves Google and YouTube. Other devices, such as my phone on the same Wi-Fi, continue working normally. What could cause this, and how should I troubleshoot it?
2 Answers
Try comparing a few different tests while the failure is active: ping a numeric IP, ping a hostname, run tracert to a site, and use curl or a browser against both HTTP and HTTPS. Also check the computer's date and time, since incorrect clock settings can make secure websites and game authentication fail. Restarting only the computer may not fix a router-side session or NAT problem, so reboot the modem/router as well and check whether its firmware or logs show connection, IPv6, or filtering errors. If another device remains fine but this PC fails on both Wi-Fi and a phone hotspot, focus on Windows, its drivers, firewall, or security software; if it works on the hotspot, ask the ISP to investigate the router or its Wi-Fi configuration.
Since your phone works on the same Wi-Fi and both ping and DNS look normal, the ISP connection and basic name resolution probably aren't the whole problem. The failure may be limited to this Windows computer, such as a broken proxy setting, firewall or security software, corrupted network settings, IPv6 trouble, or an MTU issue. When it happens, check whether a browser can open https://1.1.1.1 and whether disabling any VPN, proxy, or third-party antivirus changes anything. You can also try Windows' network reset, update the Wi-Fi driver, and test with IPv6 temporarily disabled. If possible, connect the computer by Ethernet or a phone hotspot; that will help separate a Wi-Fi adapter problem from a Windows configuration problem.

The fact that existing connections survive while new ones fail can point to a problem establishing new TCP or TLS sessions rather than a total loss of internet access. Capturing the exact error in a browser and testing another network would be useful.