Catalyzes the second of the four reactions of the long-chain fatty acids elongation cycle. This endoplasmic reticulum-bound enzymatic process, allows the addition of two carbons to the chain of long- and very long-chain fatty acids/VLCFAs per cycle. This enzyme has a 3-ketoacyl-CoA reductase activity, reducing 3-ketoacyl-CoA to 3- hydroxyacyl-CoA, within each cycle of fatty acid elongation. Thereby, it may participate in the production of VLCFAs of different chain lengths that are involved in multiple biological processes as precursors of membrane lipids and lipid mediators. May also catalyze the transformation of estrone (E1) into estradiol (E2) and play a role in estrogen formation. {ECO:0000269|PubMed:12482854, ECO:0000269|PubMed:16166196}. This is the function of ENSG00000149084 (HSD17B12, hydroxysteroid 17-beta dehydrogenase 12).