Dynamical mean-field theory (DMFT) has been employed in conjunction with density functional theory (DFT+DMFT) to investigate the metal-insulator transition (MIT) of strongly correlated $3d$ electrons due to quantum confinement. We shed new light on the microscopic mechanism of the MIT and previously reported anomalous subband mass enhancement, both of which arise as a direct consequence of the quantization of V $xz(yz)$ states in the SrVO$_3$ layers. We therefore show that quantum confinement can sensitively tune the strength of electron correlations, leading the way to applying such approaches in other correlated materials.