Make sure you and your friends are using the same Minecraft edition and version
Connect all players to the same Wi-Fi network for local play
Open Minecraft and sign in to your Microsoft account
Add friends through the Friends tab using their gamertag or username
Join a friend’s world from the Friends tab if it is set to multiplayer
Set your world to allow multiplayer in the world settings
Use a Realm to play with friends online
Join a public or private multiplayer server from the Servers tab
Enter the server address and port if you are joining a custom server
Enable cross-platform play if you are on Bedrock Edition
Check privacy and multiplayer settings in your Microsoft account
Make sure firewalls and parental controls are not blocking multiplayer
Use LAN play if you want nearby devices to connect on the same network
