ESP32 boards and required pin mappings are already clearly documented on the forum here:
Big ESP32 + SX127x topic part 3
Searching for ESP32 or ESP32 and dio would have brought you there…
Technical details about the SX1276 and its DIO ports can be found in the Semtech SX1276 datasheet.
DIO0 and DIO1 are required for LoRa modulation, DIO2 is used for FSK modulation which is not used for TTN.