The phone seems to be very picky about USB cables, if you choose “the correct” ones it works.
I ran into this as well with my newly acquired Xperia 10 III. The annoying thing is, that it even gives a “charging” notification and changes the battery symbol accordingly, even when it is not actually charging succesfully. You need to open the PSD tool to discover the ongoing battery drain.
I tried out all the USB C cables I own. Some of them work for charging – I marked them accordingly – while some others do not. I also tried different chargers, it’s the cables that make the difference, no matter whether on a 1A or 2.4A charger. But I could not make out the decisive property of the cable, they have different lengths and colors (blue, red, white, black) but no clear pattern arises.
This does of course not mean there is no software/ firmware issue involved as well. As a good sailor I just did not really often charge the phone before flashing it, so I did not gather enough data under Android
One victim of this pickyness is a power bank with a fixed cable, it fails to charge this phone