Have a wire leftover- where does it go
You must use 4-wire plugs and sockets.
3-wire was outlawed nearly 30 years ago, but you know how it is: somebody moved into a new house 25 years ago, they complained to the builder that their dryer is 3-prong so the builder changed the socket (illegally) to 3-prong to close the sale, because the building is the builder's bailiwick.  Then they buy a new dryer 20 years ago, and the installer sees a 3-prong outlets so changes the dryer plug to 3-prong because the appliance is the shop's bailiwick. 5 years later somebody else buys the house and tries to move in with their 4-prong dryer so they change the cord.  Round and round we go!  3-prong outlets are spreading like a cancer despite being outlawed.
So you need to get a 4-wire dryer cord - feel free to salvage it off the old dryer.
Then, on the dryer, there'll be a &quot;bonding strap&quot; that connects the chassis of the dryer to NEUTRAL (say what!? That's bootlegging!) That bonding strap must be removed.  Neutral and ground must be isolated, and hooked up to 2 different wires on the 4-prong cord.