The first step when installing a bathroom vanity is to cut holes (or a section) out of the cabinet back for the pipes to fit through.
Start by measuring the location of the pipes on the wall both vertically (measuring up from the floor) and horizontally (measuring from a corner or a mark on the wall at the end of the cabinet). Transfer these measurements to the back of the vanity and cut the opening using either a drill or a saber saw. Often factory-made vanities have an open back, making this step unnecessary.
Slide the vanity in place, locate the wall studs, and screw the cabinet to the wall at the top and bottom.
Install the faucet and drain on the sink before attaching the top to the vanity with a bead of adhesive caulk. Once the top is in place, attach the supply lines to the faucet and drain pipe and trap to the sink drain.