The OTA function does no work

I decided to use the new IDE
Impossible to update my IOT by OTA.
I use only ESP.
What should be done differently than for 1.8.6 ?

Hi @vVDB. Arduino IDE 2.x does not currently have network port capabilities. This deficiency is being tracked here:

Work is in progress now to implement this capability in a very powerful and flexible manner (follow the links from the link above for details, but it is not finished yet. So for now you should use the stable Arduino IDE 1.8.16 if you need network port capabilities.