Are fences enough for protecting village from raids?

On a funny note, you can check out this video for different ways to protect villagers from pillagers during a raid here.

On a serious note, yes and no. While pillagers cannot jump a cobblestone fences, they will still shoot at villagers if they can see them. According to the wiki:

They [Pillagers] shoot an arrow every 3 seconds up to 8 blocks away, following the foe for up to 12 blocks.

If you make your cobblestone wall three blocks high or higher, it should be high enough to prevent pillagers and ravagers from seeing the villagers at all and trying to shoot them.