Two reasons:
1. The methoxy group is situated at the para position, so the oxygen atom can directly donate one of its lone pairs into the benzene ring through conjugation and make it available to the carboxy group on the other side. The methoxy group thus shows +R effect.
2. The carbonyl carbon of the -COOH group ‘receives’ the donated electrons and it becomes less polar (since the two oxygens are exerting -I effect on it). Since the carbonyl carbon now has more negative charge on it, the oxygen of the -OH group can withdraw these electrons with -I effect and even that oxygen becomes less polar. Hence the O-H bond strengthens.
Strong O-H bond => less acidity. But the least confusing reason is the +R effect of the methoxy group