The Xbox mobile app must be installed first, a Discord channel must be opened, and the transfer option must be selected in the Discord app to make Xbox discord work. You will receive a notification asking you to confirm the change in the Xbox app. After that, your console should be able to connect to your Discord conversation.