Random assignment
Also called randomisation, A/B test, randomized assignment
Allocating participants to conditions by chance, which is what lets a difference between groups be read as an effect.
Random assignment is not the same as random sampling. Sampling is about who is in your study and governs how far the findings travel; assignment is about who gets which version and governs whether you can say the version caused anything. A convenience sample with proper random assignment supports a causal claim about those people; a representative sample with self-selected groups does not.
It has to be out of the participant's hands, and the condition has to be recorded with the response. Balanced blocks keep the arms level while recruitment trickles in, which matters if you might stop early.
Question randomization shuffles items or options to reduce order effects within a survey. It serves a different purpose from assigning experimental conditions.
Where it goes wrong
Regenerating an allocation until it looks balanced on something. That is no longer random, and it undoes the one property you were buying.