Can I connect esp32 to a phone USB charger?
In principle yes (see also comment in update).

The voltage is ok (5V), typically USB, and it doesn't differ from the output of a computer USB port.

The output current is max 2000 mA, so check if your project (ESP + related hardware powered by this USB), is not exceeding 2000 mA. The ESP needs much less than 2000 mA, so if you didn't have a lot of external components or motors than you will be safe.

Update

Important omment from Sim Sson: The bare esp32 is not 5V-tolerant, so using a usb-charger is only ok for esp modules that have a voltage regulator onboard.