Before proceeding, verify that the light switch is in the OFF position, and cover it with tape. If the socket is activated with 3-way switches, you must use a voltmeter or AC tester such as
https://www.homedepot.com/p/Commercial-Electric-Non-contact-Tester-with-Screw-driver-NCS-8904R/206177753
If the tester indicates power on the red wire, toggle the other switch. Tape this switch as well.
The red wire, the live wire carrying AC voltage, must be connected to the socket's center conductor (sometimes called the "hot button"), which contacts the tip on the base of the bulb. The white wire, which is the utility's neutral, connects to the other terminal. So, simply connect red to red and white to white.
In the outlet box you should see two bare copper wires connected with a "marrette" (a twist-on connector sometimes called a "wire nut"). One wire comes from the incoming cable, and the other is anchored with a screw to the outlet box. Remove the marrette and straighten the wire ends a bit, add the end of the green wire to the pair, and replace the marrette to join the three..