Then the code was redeemed on your account. Ensure you are logged in the xbox app with the same microsoft account and then restart the game it should be automatically activated.
If the game is not activated logout from xbox app and then restart your computer and then open the game directly then when requested login with the same account in the game itself.
