The factory spark plug cap is notorious for failing. They are poorly made. The NGK spark plug wire with built in cap that Ibedayank suggested is very high quality.
The engine needs 3 things to run. Have you checked for all of them?
1. - Fuel, supplied by the carburetor at the correct air/ fuel ratio.
2. - Spark, good and strong, timed to occur at the correct moment of flywheel rotation.
3. - Compression, The combustible intake charge needs to be compressed by the piston into the combustion chamber. 100psi is the minimum acceptable. Less than that and the engine will still run, but poorly.