This depends on where the game was purchased:
STEAM
- Steam players are not required to have an Xbox account or sign into an Xbox account in-game.
- If you'd like to keep rewards unlocked during an event, it is required to sign into Xbox Live. In those cases, it's easy (and free!) to set up an account.
Create an Xbox account
MICROSFOT STORE & XBOX
- Players will already have the Xbox account used to purchase the game and all event rewards will be saved.
PlayStation
- PlayStation players are not required to have an Xbox account unless they want to enable Crossplay.
When enabling Crossplay on PS5, user will receive the following prompt to sign in with a Microsoft/Xbox account.
*The code shown in the image above is just an example and cannot be used in the linking process.
The account linking process can only be performed once between Xbox and PlayStation. Additionally, Support does not have the ability to change the Microsoft account associated with your PlayStation™Network account once linked. While there is in an option in-game to unlink accounts, you can only ever re-link to the original account.
As such, please be absolutely sure you are linking the correct accounts!
Detailed steps for the process can be found in the PlayStation and Xbox account linking article.