Using an ESP32 you can designate your own SDA and SCL pins in Wire.begin() like this
Wire.begin(I2C_SDA, I2C_SCL); but be aware that some libraries may expect to find the I2C interface on the default pins
See ESP32 I2C Communication: Set Pins, Multiple Bus Interfaces and Peripherals | Random Nerd Tutorials