Hi DEEPAK SINGH,
If Xbox/Microsoft account sign-in works normally outside WCC2, the next step would be to check whether WCC2 itself is crashing during sign-in.
Go to Settings > Apps > Apps & features > WCC2 > Advanced options and select Repair. If that does not help, you can try Reset (be aware that locally stored game data/settings may be removed).
You can also press Win + R, run perfmon /rel and check for a WCC2 crash at the same time the game returned to the desktop.
If only WCC2 is affected, please contact the game's developer/support team and provide the crash information shown there. Hopefully this will help them identify the cause more precisely.