Fatal error: pins_arduino.h: No such file or directory

Then your folder is corrupted, not PlatformIO’s registry version. Remove c:\Users\.platformio\packages\framework-arduinoespressif32\ fully and rebuild your project.