A group present in the ortho position relative to the carboxyl group generates steric obstacles that force the carboxyl group to rotate and retreat from the benzene ring. After delocalization, a carboxyl group cannot participate in ring resonance and, therefore, acidity increases. We know that resonance stabilizes a molecule and the absence of which decreases stability. In the case of ortho-substituted benzoic acids, resonance is inhibited due to loss of planarity due to steric interactions of the ortho substituent.
The ortho effect is the increase in the acidity of an ortho-substituted benzoic acid compared to its meta- and para-substituted isomers.