File transfer from pixel 6 / Android 12 to Ubuntu
Samsung smartphones and especially new generations with USB-C connectors are quite "picky" about the USB cables for anything else other than just charging. It's often recommended to always use the original cable or other third-party known-good cable.
The cable that was being used, a "USB2.0 - USB-C", doesn't work for file transfer. Replacing it with a direct USB-C cable solved the problem.
I solved this problem with a USB-C to USB-C cable that was originally intended for connecting an external portable monitor.
Perhaps another good solution, in general, is to choose a cable that is designed for fast data transfer.