No, Terraria does not support Xbox and Switch. You cannot play with your friends on this Platform. If you wanted to play together you want to play only on the same Platform by purchasing it.