These two lines do different things.
This sets The Animator's
isRunning parameter to true - which is likely to affect which animation state it selects / blends to within its animator control graph.
isRunning = true;
Sets this script's
isRunning member variable to true. We can't see much of how this script functions or even what it is called in your example, but it sounds like it's used for local book-keeping of gameplay state, so that your control script knows it's in the "running" state and can make control decisions differently informed by that fact.
isRunning = true will not automatically change your animator's parameter states or affect how it selects animations to play.
animator.SetBool("isRunning", true) will not set your control script's member variable to affect its control logic.
Depending on the design of your control script, you might need to set both the animator parameter and the control script's member variable in the same places, to keep the internal control model consistent with the animated "view" of that model state.