I have some spare ATmega328 chips that are not programed and can be used in some projects specially now the prices Arduino boards got some inflation.
In order to upload the program to the IC's you will need to burn first the bootloader, at least so that later you then upload via de Arduino IDE.
Schematic and instruction are from here: https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP
Bottom Arduino is the programmer where you upload the ArduinoISP.ino code, it connects to the Arduino on top (target) that is going to have the chip to be programmed/burn.
The zif socket on the target Arduino just facilitates the insertion of the ATmega IC.
For uploading: select the Arduino programmer USB port and then the programmer type "Arduino as ISP", in the end just "burn bootloader".
After bootloader burn:
Have a great day!