KJV: And they crucified him, and parted his garments, casting lots: that it might be fulfilled which was spoken by the prophet, They parted my garments among them, and upon my vesture did they cast lots.
NIV: When they had crucified him, they divided up his clothes by casting lots.
ESV: And when they had crucified him, they divided his garments among them by casting lots
CSB: After crucifying him, they divided his clothes by casting lots.
The external evidence is so weak that the variant in not even discussed in NA.
The extra information was brought over from John 19:24.
NIV: “Let’s not tear it,” they said to one another. “Let’s decide by lot who will get it.” This happened that the scripture might be fulfilled that said, “They divided my clothes among them and cast lots for my garment.” So this is what the soldiers did.
UBS gives the omission of the words an A rating.