Iron Golems should be protecting the villages, but currently, they don't even care about pillagers.
Linked issues
Comments 2
Thank you for your report!
We're actually already tracking this issue at MCPE-42402, so we will resolve and link this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature, to see if the issue has already been mentioned.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
Do you have any more information about this? Perhaps there is some other factor that is preventing them from attacking, such as water?