Hi, good day!
When was the last time it worked properly?
Have you made any changes to your computer recently?
Please try to download and run the Gaming Services Repair Tool for PC.
https://support.xbox.com/en-US/help/games-apps/troubleshooting/gaming-services-repair-tool
I look forward to receiving your update and I'm willing to collaborate with you till we resolve the issue. Do keep me informed by clicking "Add comment" below.