This is the scenario of used/unused pins of ESP-WROOM-32 Module when seen togethr with Camera, PSRAM, and SDCard: (Prepaerd consulting the schematic of ESP32-CAM Module, Fig-1.)
Figure-1:
#/GPIO_ESP-WROOM-32_Module UsedByCAM UsedByPSRAM usedBySDCard
1/GND
2/3.3V
3/EN
4/36----------------------------Yes(CAM)
5/39----------------------------Yes(CAM)
6/34----------------------------Yes(CAM)
7/35----------------------------Yes(CAM)
8/32----------------------------Yes(CAM)
9/33--free(driving)onboard_LED
10/25---------------------------Yes(CAM)
11/26---------------------------Yes(CAM)
12/27---------------------------Yes(CAM)
13/14--(free if SDCard not used)-------------------------Yes
14/12--(free if SDCard not used)-------------------------Yes
15/GND
16/13--(free if SDCard not used)-------------------------Yes
17/9------------------------------------Yes(PSRAM)
18/10----------------------------------Yes(PSRAM)
19/11-------free--------------
20/6--------free-------------
21/7------------------------------------Yes(PSRAM)
22/8------------------------------------Yes(PSRAM)
23/15--(free if SDCard ot used)-------------------------------Yes
24/2---(free if SDCard not used)------------------------------Yes
25/0-----------------------------Yes(CAM)
26/4--(free if SDCard and Flash Bulb not used)---------Yes
27/16------------------------------------Yes(PSRAM)
28/17------------------------------------Yes(PSRAM)
29/5-----------------------------Yes(CAM)
30/18---------------------------Yes(CAM)
31/19---------------------------Yes(CAM)
32/NC
33/21--------------------------Yes(CAM)
34/3------free after uploading--
35/1------free after uploading--
36/22------------------------Yes(CAM)
37/23------------------------Yes(CAM)
38/GND
Total free GPIO lines: 11
GPIO-33, 14, 12, 13, 11, 6, 15, 2, 4, 3, 1
Figure-2:
(Facing Camera) on ESP32-CAM Module -- at right/bottom.