If it is the ESP32C3 you are using, then A0 (GPIO2) and A1 (GPIO3) are strapping pins that have different functions at power-on and should not be used to avoid trouble.
If it is the ESP32C3 you are using, then A0 (GPIO2) and A1 (GPIO3) are strapping pins that have different functions at power-on and should not be used to avoid trouble.