Ok, so here is a helpful wiring diagram. It may not be exactly like your bike but it should be instructive.
You want to keep your eye on two wires in particular. They’re both from the ignition coil, which is underneath the one most visible in your most recent pic.
One is usually blue, and it comes up from the stator to the terminal block, and from there to the big, chunky, plastic-looking high tension coil. That coil should have another wire grounded to the engine, and of course the wire to the spark plug.
(The kill switch is usually wired in here somewhere. Identify that wire and take it out of the terminal block for now. If you get the bike started without it, you can shut it down by sticking a potato on the exhaust. This is how ASE-certified moped mechanics do it all the time.)
The other is usually blue with a black stripe, and it sounds like you found it. This is the ignition ground. It goes to the terminal block, and from there it should go to something bolted to the frame or the engine or something. If it’s sharing a slot on the terminal block with some other wire, remove that other wire for now and check the ground connection — you want it someplace clean and free of paint, rust, grease, etc etc.