Header File not readable

The problem here is that it’s using a wrong library for the build.

Sadly as per arduino-esp32/libraries at master · espressif/arduino-esp32 · GitHub, the Arduino-ESP32 has no built-in servo library.

The most recent replacement for it seems to be GitHub - madhephaestus/ESP32Servo: Arduino-compatible servo library for the ESP32. The library is available pere https://platformio.org/lib/show/4744/ESP32Servo/installation.

So you should first use the “Clean” project task, then remove the .pio folder of the project to fully get rid of the old library, and then use the new library per

lib_deps =
     madhephaestus/ESP32Servo @ ^0.9.0

in the platformio.ini.

Of course you should read GitHub - madhephaestus/ESP32Servo: Arduino-compatible servo library for the ESP32 for usage hints.