A valve cover gasket will not cause problems with the part of the spark plug threaded in the cylinder. The leaking gasket can be bad enough that it coats the exposed part of the plug and can also cause problems with the plug wires. List the codes that you retrieved and those need to be addressed. Step by step, basics first.