Install the hardware diagnostic and configuration utility onto your ESP32 CYD board.
Connect USB, select the device, and flash. The display driver (ILI9341/ST7789), rotation, colour order and inversion are all switchable at runtime from the on-device menu, so this one build covers ESP32-2432S028R/C, JC2432W328 and most Sunton/Guition CYD clones.