ESP32 is a series of low-cost, low-power systems on a chip microcontroller with integrated Wi-Fi and dual-mode Bluetooth. The ESP32 series employs either a Tensilica Xtensa LX6 microprocessor in both dual-core and single-core variations, Xtensa LX7 dual-core microprocessor, or a single-core RISC-V microprocessor and includes built-in antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules. ESP32 is created and developed by Espressif Systems, a Shanghai-based Chinese company, and is manufactured by TSMC using its 40 nm process. It is a successor to the ESP8266 microcontroller.
STM32 is a family of microcontroller ICs based on the 32-bit RISC ARM Cortex-M3 3F, Cortex-M7F, Cortex-M4F, Cortex-M3, Cortex-M0+, and Cortex-M0 cores. STMicroelectronics licenses the ARM Processor IP from ARM Holdings. The ARM core designs have numerous configurable options, and ST chooses the individual configuration to use for each design. ST attaches its own peripherals to the core before converting the design into a silicon die. The following tables summarize the STM32 microcontroller families.
More details: https://www.utmel.com/components/esp32-vs-stm32-which-one-is-better?id=1383