Numerical calculations on a mesoscopic ring of a type II superconductor in the London limit suggest that an Abrikosov vortex can be trapped in such a structure above a critical magnetic field and generate a phase shift in the magnetoresistance oscillations. We prepared submicron-sized superconducting loops of single-crystal, type II superconductor NbSe$_2$ and measured magnetoresistance oscillations resulting from vortices crossing the loops. The free energy barrier for vortex crossing determines the crossing rate and is periodically modulated by the external magnetic flux threading the loop. We demonstrated experimentally that the crossing of vortices can be directed at a pair of constrictions in the loop, leading to more pronounced magnetoresistance oscillations than those in a uniform ring. The vortex trapping in both a simple ring and a ring featuring two constrictions was found to result in a phase shift in the magnetoresistance oscillations as predicted in the numerical calculations. The controlled crossing and trapping of vortices demonstrated in our NbSe$_2$ devices provide a starting point for the manipulation of individual Abrikosov vortices, which is useful for future technologies.