COOH group in benzoic acid doesn’t takes part in resonance with benzene ring, but has resonance within itself that is -OH group resonates with the =O bond.Formic acid is more acidic due to the priority of electronegativity that is,
H maximum then Ph then CH3.
This is the obvious reason for that.