This complements Justme's answer.
Electrically a circuit can be broken anywhere to stop current flow.
Secondary effects such as capacitive coupling may be important in some cases, but for simple applications "anywhere will do" for functionality.
HOWEVER Justme's reference to "a contimuous ground" is a gateway to all sorts of other effects. Circuits are in most (but not all) cases "ground referenced. Energy can be thought of as flowing from positive to ground or mains live/phase to grounded neutral or ... . These are just conventions but tend to hide the fact that ground is part of a circuit and that energy will flow from "live" to ground regardless of how the ground is provided.
If a motor is powered by say 110 VDC or 110 VAC and you disconnect the ground lead to stop the motor then the WHOLE of the motor and its wiring on the live side of the motor and ON THE NOW UNGROUNDED SIDE OF THE MOTOR and and on wiring on the live side of the switch is at 110 V relative to ground. If you electrically connect "a person" from ANYWHERE on the live equipment or wiring to ground they will receive an electric shock - quite possibly a fatal one. Even the motor body will be at 110V if it is"grounded" in normal operation.
Additionally, if you connect a grounded conductor to the motor wiring or body on the switched side of the motor the motor will operate, or attempt to. Results can range between surprise and death. All are to be avoided.
The same undesired results are achieved if the motor positive side is usually grounded during operation.
- The key point is that the portion of the circuit which is grounded and/or accessible to contact during operation must not be the switched side.
In a few specialist cases neither side of a circuit is grounded.
One example is some marine power systems where the hull and all metal fittings are at ground (water) potential. The power system "floats" relative to ground with NO immediately dangerous results occurring if either side is grounded. However, grounding one circuit leg immediately renders the other side a hazard relative to ground.
Floating systems like this monitor for such faults and they are pursued vigorously.
Another such system is the output of an isolating transformer.
As long as neither output circuit leg is grounded either can be switched and either can be touched safely.
Ground either leg (not both) and the protection is removed.
In some residential mains distribution system such as a "ring main" phase/live is fed to eg light sockets and the neutral line to the socket is switched. This is an arcane arrangement from the pit of hell and should never be used. But, it occasionally is.
I learned about their existence 40+ year ago ny standing on a step ladder and working on a "dead" light scket - mit spitzen sparken.