Burn a bootloader with platformio

Is it possible to use an arduino nano as an isp to programm a atmega 328p and burn the bootloader with platformio ( In the arduino ide it works and i have already Done this )

Yes, Arduino as ISP is a valid programmer target for PlatformIO - see the documentation for how to configure that (and don’t confuse Arduino as ISP with ArduinoISP - they are two completely different things)…

… but …

… is were you’ll come unstuck… there’s no ‘upload bootloader’ option for platformio… so no way to tell it to do that.

For that job, easiest to just use the Arduino IDE for that one task than learning how to use a different tool like avrdudess (GUI helper for avrdude) or avrdude itself.

See Atmel AVR — PlatformIO latest documentation