Wow, where to begin!!
What is this code intended to achieve?..
You’re also doing digitalWrites to physical pins that don’t exist on the ESP32. Are these meant to be Blynk.virtuaWrites ?
I’d suggest that you do a little reading…
Pete.