We are currently learning about resonance and induction, but I am confused why the addition of the hydroxyl group increases the pKa. As oxygen is more electronegative, should it not increase the acidity via induction? If it is to do with resonance, why doesn't the acidity also decrease when the 4th carbon is bonded to a chlorine; should this not be able to donate electrons via resonance as well?
Assuming you’re referring to the acidity of the protons on the aromatic ring:
The OH is an electron donating group by resonance. By deprotanating your forming an anion on the ring. As the ring is increased in electron density, the anion is less stable than if there was not an electron donating group.
By having a less stable conjugate base, the aromatic ring is less willing to loose a proton/less acidic