Neatly explained in the how to Repair or Replace 3 prong plug on a power cord in the above video.
There is a standard practice here.
White wire goes on the silver terminal.
Black wire goes on the gold terminal.
Green wire goes on the green terminal.
Failure to follow these steps can cause damage to the device or cause personal injury.