How reset RTC on ESP32?

You want to set the CPU's cycle counter back to 0?

The ESP32 has a nano-second cycle counter which is used to derive other timings. The ESP32's API uses esp_restart to reset the cycle counter. Miscellaneous System APIs - ESP32 - — ESP-IDF Programming Guide latest documentation (espressif.com)