Pixel Charges but Will Not Transfer Files: USB Checks
If your Pixel charges over USB but does not show files, check both the cable and the USB mode. Google says not every USB cable supports file transfer. Unlock the phone and select File Transfer from its USB notification before treating charging as proof of a working data connection.