Elden Ring has what's known as "
cross-gen" play, meaning those playing the game with someone in the same console family can do so together. If you're playing on Xbox One and your friend is on Xbox Series X, for instance, you can play together. The same rule also applies for those buying on PS5 and PS4. If you know your friend is getting the game on PS5 yet and you don't have one yet, you can plan on buying the PS4 version.
Elden Ring does not support full cross-play. If you are playing on a PlayStation system, you will only be able to play with other PlayStation users. The same goes for Xbox and PC, respectively.