It's either you convert the 3-prong outlet to 4-prong or the 4-prong cord to 3-prong. But the latter is easier and more feasible. Unplug the dryer then disconnect the 4-prong cord from the dryer. Note that it has red, black, white, and green/yellow wires but sometimes the red and black wires are both replaced by same color wire, usually gray. The red and black wires are lines L1 and L2 reversibly, meaning they can switch places, while the white and green/yellow wires are the neutral line and ground, respectively.
Get yourself a 3-prong cord and note that it has red , black, and white wires but sometimes, like the 4-pronged one, the red and
black wires are both replaced by same color wire, usually gray and can also switch places. All you have to do now is connect these 3 wires in the same manner they are connected as 4-prong cord to the terminal block. The wire strapped to the dryer cabinet and connected to the green/yellow wire of the 4-prong cord wire is now left hanging. The last step is to connect this hanging strap wire to the same terminal on the terminal block (center) where the white wire (neutral) is connected and it's done.
It can be observed that converting a 4-prong cord to 3-prong cord is merely joining the neutral line (white) and the ground (green/yellow) thereby reducing the number of prongs from 4 to 3. On the other hand, converting a 3-prong cord to 4-prong cord is merely splitting the neutral
line and the ground thereby increasing the number
of prongs from 3 to 4. The link below might enlighten you further on this matter.
Electric Dryer Prong Conversion