Its my experience that the Pixhawk6X appears at /dev/serial0on the compute module 4. My digging around in the BlueOS source suggests it never looks on that device for the flightcontroller and so you will need to connect it via the usb bus (which causes it to show up at /dev/ttyAMAx) for BlueOS to see it. An earlier thread discussing this is here Various issues running BlueOS on Pi CM4?