Original article from Windows Central - (Can’t post a link )
From the Xbox dashboard, open the guide menu by tapping the Xbox button in the center of your controller.
- Navigate right to the settings menu.
- From here, go to Online safety & family from the General tab.
- Select Privacy & online safety.
- Select Xbox Live privacy.
- Select View details & customize.
- Select Communication & multiplayer.
- Under You can play with people outside Xbox Live , select either Block or Allow depending on your preference.
Note: To ensure the setting has taken hold properly, restart your games after changing the setting.
Choosing Block will prevent your Xbox multiplayer games from connecting to PC and mobile players but may increase multiplayer games’ waiting times. Choosing Allow will connect your multiplayer sessions to PC and mobile players and will result in quicker matchmaking. However, mouse and keyboard players may have an advantage if you’re using a controller or a touch screen device to play.
Edit: Remember to turn it back on for games that work good with Crossplay.