The lift vector though is relevant. Lift is derived at 90 degrees to the lifting surface. With dihedral, the more horizontal wing's vector gives more force upwards, hence more lift, whereas the vector of the wing pointing up is more sideways, so less lift upwards. The imbalance causes a restoring force.