As you can see in their example, in esp32-ota-https-example/ota_example_main.c at master · RadialDevGroup/esp32-ota-https-example · GitHub
EXAMPLE_SERVER_DNS is used both for setting the hostname and for the tcp connect.
Also in this example, you will see the comment before setting the hostname:
/* Hostname set here should match CN in server certificate */
So, you will need to change the hostname in this function call, to the valid hostname of your server