Not to stop the war, but to degrade Russia's ability to prosecute it and any future aggression. We should be doing everything that stays short of the nuclear trigger to destroy Putin's war machine.
That right there. Sanctions like this are meant to make prosecuting a war more expensive, so make ending the war more appealing, but also to make it harder to recover from e.g. battlefield losses of equipment, and to otherwise make further military buildup slower and more difficult, if the war keeps going for any length of time. In a case like this, they're not just "to stop the war", at least not immediately, even if that would be considered a great outcome. They haven't necessarily failed if they don't bring a swift end to the war, even if that'd be considered ideal.