Let us see the structure of ascorbic acid
As shown there is no COOH group however the OH group can lose a proton and forms conjugate base
The conjugate base formed is stabilized due to resonance
More the stability of conjugate base more the strength of acid
Hence ascorbic acid behaves as an acid