Installing new dishwasher with existing power cord
Usually you can use a cord/plug with a dishwasher.

What was the cord that you used from originally?  Some people have used cords that have been cut off of old appliances and electronics, which may not be up to the task.  For example, if you cut the cord of a kettle (resistive wire) or a DVD player (low current) you may end up with problems.

You can buy kits:
https://www.whirlpool.com/-[4317824]-1001038/4317824/

Or you can reuse a beefy 3-prong cord from another appliance.  The only way I can think that the cord might cause the pump to fail is if it was resistance wire, or limiting the current.  A big percentage of appliance failures are in the first 30 days, so the pump failing and the cord are probably unrelated.