To work with external storage such as SD and microSD cards, we should have an SD/microSD card breakout device. We attach this breakout device into the ESP32 board through SPI and SDMC pins.
SD/microSD card breakout devices are widely available in electronics stores. For example, you can use the SparkFun microSD Transflash Breakout. You can attach a microSD card into this breakout, which you can find at SparkFun's website: https://www.slparkfun.com/products/544. A form of the SparkFun microSD Transflash Breakout is shown in the following photo:
If you prefer to use an SD card with the ESP32, you can choose a breakout device for an SD card. For example, you can use the SparkFun SD/MMC Card Breakout. You can get this device on the official website: https://www.sparkfun.com/products/12941...