Floating Monitor

This is not a “compilation” error. This error is about opening the COM port.

The C3 and C6 are a bit tricky to handle because of their native USB port.
In contrast to UART (USB to Serial), the serial connection to a native USB port is disconnected when the ESP is restarted. As a result, the COM port on the computer disappears briefly and may reappear under a different COM port number. This makes handling somewhat more difficult than, for example, with an ESP32 that is connected via a USB 2 serial chip.

You did not specify the version. Which platform32 version do you actually use?

For the ESP32-C6 you have to use a version that supports Espressif32 Arduino 3.x. Therefore pioarduino is the way to go as the official platform32 will stay at Arduino 2.x. See ESP32-C6-Zero does not work on PlatformIO - #10 by sivar2311