A cytochrome P450 monooxygenase that plays a major role in adrenal steroidogenesis. Catalyzes the hydroxylation at C-21 of progesterone and 17alpha-hydroxyprogesterone to respectively form 11- deoxycorticosterone and 11-deoxycortisol, intermediate metabolites in the biosynthetic pathway of mineralocorticoids and glucocorticoids (PubMed:10602386, PubMed:16984992, PubMed:22014889, PubMed:25855791, PubMed:27721825). Mechanistically, uses molecular oxygen inserting one oxygen atom into a substrate, and reducing the second into a water molecule, with two electrons provided by NADPH via cytochrome P450 reductase (CPR; NADPH-ferrihemoprotein reductase) (PubMed:25855791). {ECO:0000269|PubMed:10602386, ECO:0000269|PubMed:16984992, ECO:0000269|PubMed:22014889, ECO:0000269|PubMed:25855791, ECO:0000269|PubMed:27721825}. This is the function of ENSG00000231852 (CYP21A2, cytochrome P450 family 21 subfamily A member 2).