Many pins can actually do both
see ESP32 Analog Input with Arduino IDE | Random Nerd Tutorials for example