Place a level on the sink width-wise and depth-wise to measure in which directions the sink top is not level. Turn the water supply valve handles under the sink clockwise until they stop, and then disconnect the water supply lines from the underside of the faucet using a basin wrench.
Place a bucket under the sink’s drainpipes. Disconnect the drainpipes by turning the compression nuts counterclockwise with a pipe wrench. Back out any screws that are holding the vanity’s counter to the cabinet.
Lift the vanity’s counter off the cabinet and place it aside. Place the level on the edges of the cabinet to check that it is level. If you find that any portion of the cabinet does not sit level, remove the screws holding the cabinet to the bathroom wall, and then drive shims under the low-lying edges of the cabinet until it sits level.
Drive the mounting screws through the holes in the cabinet and back into the wall. Replace the vanity’s counter and place the level on the different sides of the counter to check that it sits level. If the counter does not sit level, place shims between the counter and the top edge of the cabinet until it sits level.
Drive the mounting screws the counter’s anchors and into the cabinet. Thread the sink’s drainpipes back together, tightening the compression nuts by hand. Thread the water supply lines back onto the underside of the faucet, tightening the connections with a basin wrench. Turn the water to the faucet back on and run the faucet for two minutes to check for leaks under the counter.