Acetic acid is carboxylic acid and Carboxylic acids are acidic due to resonance stabilization of carboxylate anion and in phenols, acidic character is present due to resonance stabilization of phenoxide anion. Carboxylic acid are more acidic than phenols because the negative charge in carboxylate anion is more spread out as compared to the phenoxide ion as there are two electronegative O-atoms in carboxylate anion in comparison to one in phenoxide ion. In the resosnce structures of carboxylate anion, the negative charge is present on the O-atoms while in resonance of phenoxide ion negative charge is also present on electropositive carbon atom, which leads to less stability of phenoxide ion than carboxylate anion.
Formic acid: HCOOH
Acetic acid: CH3COOH
In acetic acid, a methyl group is attached to the -COOH group , this methyl group show electron donating nature because of which the acidic strength of the -COOH group gets deceased.
In Formic acid, this methyl group is not present and a H atom is attached to -COOH group which do not show any such electron releasing nature.
So Formic acid is more acidic than acetic acid.