After applying to delete (close) your Xbox account, you have 60 days to cancel.
1. Sign in to your Microsoft account. [Link] https://account.microsoft.com/account/
2. Entering the security code will restore your account, and you'll be able to use the services associated with your account.
For more information, please check Microsoft FAQ.
[Go to Xbox FAQ]