Hello @Robertolo
if you look at the M5Core2 schematic in the top left corner you'll find AXP192 and its inputs ACIN (connected to USB_5V) and VBUS (connected to BUS_5V). USB_5V comes from USB and BUS_5V comes from the LAN module.
The AXP192 automatically switches between the available power sources and picks the one best suitable. Please also check the AXP192 datasheet.
Thanks
Felix