Since you went with 10/2 for a 240v outlet that means your cable will have two hots and a single ground. But the cable you bought will have a black, white and bare/green wire. Make sure that you wrap both ends of the white conductor with red electrical tape to indicate that it is also a hot wire. White normally indicates a neutral, but since you won’t have a neutral wire in this cable, it’s important to mark it. Otherwise someone else may work on this outlet in the future, see a white wire, assume it’s a neutral, wire something up with it as a neutral, and give themselves a pretty bad shock.
You can mark it either red or black, but you already have one black wire, so it would be best to mark it red, just to differentiate it.