If I understand your experiment correctly, it sounds like you are interested in finding the effect of two different visualisation methods on some visualisation outcome, across four groups defined by different gender and university major. If that is correct then your variables are the following:
$$\begin{equation} \begin{aligned}
\text{Response variable} & & = & \quad \text{Visualisation outcome,} \\[6pt]
\text{Treatment variable} & & = & \quad \text{Visualisation method (A/B),}\\[6pt]
\text{Covariates} & & = & \quad \text{Gender (F/M) + Major (STEM/Art)}. \\[6pt]
\end{aligned} \end{equation}$$
Since your goal is to find the effect of the your treatment variable, this is the one you need to randomise. In this case you can easily use block randomisation over the four blocks defined by your covariates. In each of these blocks you have five people. Within each block, randomly assign a specified number of people into the treatment groups (e.g., visualisation method A) and keep the remaining people in the control group (e.g., visualisation method B). Since this variable is randomly assigned, it is statistically independent from the covariates, and any possible lurking variables, so you should be able to make a causal inference about its effect on the response variable. By using block randomisation you also ensure that your randomisation will tend to yield a treatment vector that is closer to orthogonal to the covariates, thereby reducing variance in the subsequent regression analysis. You also don't have to worry about colliders in this analysis, since gender and university major are not causally affected by the treatment or response.
There are two issues here that need to be de-coupled. The first is the requirement of randomisation for causal inference in an experiment. The second is the requirement of random sampling for inference about a broader population. It is worth noting that if your treatment variable is the visualisation method then randomisation of this variable allows causal inference, but your inference is still confined to your sampling frame. In other words, so long as you randomise your treatment variable, you can legitimately infer the effect of this variable for the population of people corresponding to your non-random sampling method. Discuss this further with your advisor to see what it is he wants you to make an inference about. If he wants you to make an inference about the entire body of college students then it would be appropriate to use a random sampling method to sample from this population.