Laptop takes a very long time to connect to Microsoft services
I have an HP Omen 15z-en100 laptop (AMD Ryzen 7 5800H, Nvidia RTX 3070, 32GB DDR4 RAM). It's had this problem for as long as I've had it where it takes forever for any Windows services or UWP apps that need to connect to Microsoft services in one way or another. This includes Windows update, the Microsoft store, the Xbox app, and Xbox/Windows games such as Minecraft that are installed through the Microsoft store. In Windows update, if you click "check for updates," it will just sit there with a loading bar until it decides to connect to Microsoft. The Windows store will just show the loading screen with the grey boxes, the Xbox app will stay on the "Launching the Xbox app" screen, and the Minecraft Launcher will stay on the "signing in" screen. Today, I decided to run an experiment. I opened all the apps that typically have this problem at the same time and waited to see how long it would take them to connect. It took 50 minutes of the computer sitting there doing nothing else before it decided it was time to connect to Microsoft, and all the apps got past the loading phase at the exact same time.
The weird thing is, it acts like a short term memory loss problem. Once it "remembers" how to connect, it will consistently connect quickly for the rest of the day or even sometimes the next day, even if you restart/shut down for a while. But if I don't use it for a few days, it will "forget" how to connect again.
This is not a problem with my internet connection. It happens frequently no matter what network I'm connected to, and my ping and upload/download speeds are fine if I check them while it's having the issue. Other Windows computers on my network don't have this issue and will connect just fine while my laptop is struggling. I can connect just fine to Microsoft websites in a web browser when the issue is happening, so it seems to be at a system level. This issue has survived through 2 clean installs of Windows 10 and a clean install of Windows 11 (all with complete drive formats and installing Windows from a USB). I have not been able to find anyone else with this issue through web searches, all that comes up is people having trouble connecting to the internet in general. The Windows built-in troubleshooters have not helped.
If anyone knows what's going on here or further steps I can take to diagnose it, please let me know.
Thanks
KP