You might have cross-play disabled in your console settings. If you’re on Xbox, 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 Allow