Stopping or at least slowing down the attacking cells is exactly what the biologic drugs such as Remicade, Stelara, Entyvio, etc. are doing (or trying to do). Remicade and Humira both bind up TNF - a protein that stimulates certain white blood cells to become activated and attack. Stelara and Skyrizi both bind up IL23 - different protein that stimulates certain other white blood cells to become activated and attack. Entyvio binds up integrin - a cell surface protein that promotes white blood cells sticking to and communicating with other cells, again blunting the attack, since the activation attack signals passing between cells is reduced or stopped.
Now what causes the attacking white blood cells to go on the attack in the first place is a different question. What you are really asking then is "What causes Crohns disease?" That's where we get into all the different theories: MAP adherent E coli, fungus, antibiotic exposure, genetics, diet, food additives, or some combination of the above, etc. The list is long and there are new theories every year. It's clear there is a bacterial exposure involved in many cases of Crohn's, but the exact mechanism is not known, and there are multiple candidate bacterial villains.
The immune system is an immensely complex network of interacting cells and proteins, and as such it can be disrupted in multiple different ways. Thus, there is no one cause of Crohn's disease, but there are several different and different types of disruptions that can trigger an overly active immune response that we would recognize as IBD.