To disable Pillager raids in Minecraft, you will need to use a gamerule command.
Before you can use commands, you will need to enable cheats via the option to do so in the main menu or when you go to create a brand new Minecraft world.
Once cheats and commands are enabled, you can disable all Pillager raids by opening the chat in the game and typing or copying and pasting /gamerule disableRaids true, and hitting enter.
Related: How to remove Fire Damage in Minecraft?
Doing so will then prevent all Pillager raids from happening in the game, and you won’t need to worry about them attacking villagers or villages in Minecraft.
If you want to use this command for a server, all you need to do is locate your Server console and paste or type the same command in, and it will have the same effect, just like with client-side games.
But if you ever want to revert the changes made to Pillager raids, all you need to do is copy and paste /gamerule disableRaids but instead of true type false at the end.
After this, all changes you made to the death screen should be reverted, and Pillagers will attack your villages when it is time for them to do so.
Check out some of our other awesome Minecraft guides!