It depends on the game. For games like Fortnite, Minecraft, and Call of Duty: Warzone, you may need to create or link existing accounts (Epic Games, Microsoft, Activision) to add friends from Xbox.