Filler pieces
If the wall is not level and flat, the filler piece must be cut to fit to the wall’s shape. To do this, you’ll need a filler piece, measuring tape, small block of wood about 1-1 1/3” thick and pencil.
Cut the filler piece so it’s the same height as the cabinet. Place the edge of the filler piece against the wall. Hold the block of wood flat against the wall with the pencil against it. Keep them pressed against the wall as you slide them down the length of the filler piece. Now you have traced the shape of the wall onto the filler piece. Cut along your trace line.
Place the newly cut edge of the filler piece against the wall (it should fit perfectly). Mark the edge of the cabinet on the top and bottom of the filler piece. Draw a straight line from these points and cut.