Sorry. I forgot to mention about it.
expected problem is bootloader. if you buy a atmega328p mcu. it should be fresh one which you need to burn bootloader yourself. for this, you need usb programmer connect to SPI pins of mcu. after, you can download program through usb/ttl as you are doing now...