Semiconductors are made at large buildings called fabrication plants or foundries. Fabrication is super clean by necessity — the clean rooms at fabs are orders of magnitude cleaner than most hospital rooms because small specks of dust are much larger than transistors and can destroy chips.
What differentiates differently performing computer chips on the market isn’t arbitrary. Silicon wafers with more imperfections end up being lower-performing ones. Purer ones the opposite.
CMOS processing is done in two big parts: one is the front-end-of-line (FEOL), where transistors are formed. The other is in the back-end-of-line (BEOL), where wires are built.