XCOM 2 developer Firaxis Games has announced that the multiplayer modes are going to be shut down, if you're using the Windows version that is.
Read the full article here: https://www.gamingonlinux.com/2022/03/xcom-2s-multiplayer-being-removed-but-will-still-work-on-linux-and-steam-deck