How to use 2 I2C and UART simultaneously in ESP32?

You might be interested in reading the ESP32 API on the differences between portA and portB.

PortB pins, those pins >32 are inputs only.

See: API Reference - ESP32 - — ESP-IDF Programming Guide latest documentation (espressif.com)