Overview of RP2040
The RP2040 is a stateless device with external QSPI memory cached execute-in-place functionality.
Overview of ESP32
ESP32 is a low-cost, low-power system on a chip (SoC) series with Wi-Fi and dual-mode Bluetooth features developed by Espressif Systems!
Conclusion:
The Raspberry Pi Pico is a beginner-friendly microcontroller board that uses MicroPython to provide a warm introduction to the IoT branch and microcontrollers. The ESP 32, on the other hand, is a small but powerful microcontroller board.
If you are interested in that, try to follow the below link to see the article about them.