Hi Kentagi,
Is the device behind a firewall? If the problem persists after reinstalling Windows, it is either the server from Microsoft or the Network connectivity causing the problem.
In the Windows search,
Type cmd, right-click it, and choose Run as Administrator.
Execute these commands:
netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
Please keep me updated.