Vanilla Minecraft should really have a difficulty called 'Pacifist' that sits between peaceful and easy. It should allow mobs to spawn, but prevent them from attacking the player unprovoked. This Forge mod attempts to address this shortfall by forcing all aggressive mobs to not be hostile towards players. The mobs will become hostile when attacked and seek their revenge, though they will often become pacifist again rather than fight to the death. Be aware that Piglins and Hoglins will still take exception to players not wearing an item of gold armor, though they will not directly inflict damage on players.
This mod is very lightweight, and as such currently offers no configuration options.
Please watch the following short review posted by Boodlyneck. Check out and subscribe to the channel if you haven't already, as it's an excellent resource for discovering new mods.
Note that as this mod requires hostile mobs to spawn, it becomes useless if the player selects peaceful difficulty.
Check out another mod of mine called Scarper that causes passive mobs to run away when another nearby mob is attacked