is there a way to upload code to atmega328p using the v-usb library without any external programer can someone help me out
You could try to write a bootloader based on V-USB. I would start with the open-source USBasp project (a USB ISP device on an ATtiny).
i am not that advanced to write a bootloader
. do you know someone who worked on it