How to make mobs attack each other in Minecraft
Solution 1:
Though this is not universal to all mobs, you could name a vindicator "Johnny", and it would attack all mobs in its vicinity, except for other illagers.
Alternatively, you could try spawning a skeleton and a different mob, and going into Survival mode, running between the two mobs. The skeleton would try and shoot you, but you dodge it, causing the fired arrow to hit the other mob. This would cause a mob fight to be staged.
I hope these methods work well.
Solution 2:
You can use the /team and make two teams and assign the mobs to the teams. The mobs will fight each other automatically.
Solution 3:
If you position a skeleton behind another mob and the skeleton shoots that mob, they will attack each other, or you can use a vindicator named "Johnny" which will attack every mob around it (including other Illagers), but those mobs won't fight back. Enemies accidentally attacking each other is the best way to do this, and it's super easy to set up too. Otherwise, TGPMinecraft has a good method for doing this and his answer is useful if you mean to do this by commands