This heavily depends on the game you're playing. Plenty of multiplayer games in the VR world have crossplay supported, but some are specific per headset, so you need to check on the game pages before you purchase to make sure it's supported.