Cranks but sometimes it will not start, or stops suddently
That is not a lot to go on, but it sounds like an ignition problem. Not likely plugs or wires, but maybe the coil, a wire to it or the ignition switch.
When it is not starting you can try checking for spark. The usual way is to buy a spare spark plug and remove a spark plug wire from one plug (Don’t pull the wire, pull the connector.) and put the new plug on the wire and hold the threads against the engine block while someone tries to start it. Note: if you don’t use a well insulated tool to hold it, this can be a shocking experience. Look for a bight blue spark. In this case, I would say any spark.