Why acidity of p-methoxybenzoic acid is more acidic than p-hydroxybenzoic acid?
Both -$\ce{OCH3}$ and -$\ce{OH}$ groups have exhibited two effects on the aromatic ring: (1) Electron donating resonance or mesomeric effect (+M) and (2) Electron withdrawing inductive effect (-I). For both acids in hand, the electron withdrawing inductive effect (-I) is almost same since both -$\ce{OCH3}$ and -$\ce{OH}$ groups are 4 carbons away from the acid center. However, when -$\ce{OH}$ group is attached to either the para- or ortho-position, it has a more tendency to delocalize its lone pair electrons towards the aromatic ring than that of -$\ce{OCH3}$ group (Order of activating:  -$\ce{O-} \gt$  -$\ce{OH} \gt$  -$\ce{OCH3}$; for additional learning, read articles on Hammett plots).

As a result, the electron density on the carbon para to -$\ce{OH}$ substitution group increases more than that on the carbon para to -$\ce{OCH3}$ substitution group. Thus, the electron density on carbonyl carbon of carboxylic group attached to those para-carbons also increases accordingly, and consequently, the polarity of $\ce{O-H}$ of carboxylic group decreases as a result. That polarity decrease causes the reduced acidity ($\mathrm{p}K_\mathrm{a}$s are $4.58$ and $4.47$, when para-substitutions are $\ce{OH}$ and $\ce{OCH3}$, respectively) compared to benzoic acid ($\mathrm{p}K_\mathrm{a}$ is $4.20$ when para-substitution is $\ce{H}$). The $\mathrm{p}K_\mathrm{a}$s of p-hydroxybenzoic acid is higher than that of p-methoxybenzoic acid here, because as explained above, p-$\ce{OH}$ group caused reduced polarity on $\ce{O-H}$ of carboxylic group than that caused by p-$\ce{OCH3}$ group.