ESP32C3 output doesn't show on serial monitor after restarting the ESP32

I have a XIAO ESP32C3. When I upload a sketch, it runs and I can see all the output on the serial monitor. However, if I then decide to unplug and plug my ESP32 the sketch will run but I can't see the output on the Serial Monitor anymore, even after I manually open it.

try closing and opening the serial monitor.

Which XIAO ESP32. There are many.
Did you enable "USB CDC ON BOOT" during upload.
Leo..

No. but I will try activating it and checking.

works with "USB CDC ON BOOT" and i am using XIAO ESP32S3

I have the XIAO ESP32C3. I have already have USB CDC ON BOOT but I still have this problem

You didn't post your sketch.
You didn't say which IDE version or OS you use either, so we can't try.
Make sure you read the forum posting guidelines first.
Leo..

I apologize I'll do that next time. I'm on Sonoma 14.5 and the IDE version is 2.3.6. I'm going to send the sketch in a second.

#define MOTOR_PIN D0

void setup() {
  Serial.begin(115200);   // Start serial communication at 115200 baud
  delay(1000);            // Wait for a second
  Serial.println("Hello from ESP32-C3!");
  pinMode(MOTOR_PIN, OUTPUT);
  Serial.println("Turning motor ON");
  digitalWrite(MOTOR_PIN, HIGH); // Should turn on
  delay(5000);                   // Wait 3 seconds
  Serial.println("Turning motor OFF");
  digitalWrite(MOTOR_PIN, LOW);  // Should turn off
}



void loop() {
  digitalWrite(MOTOR_PIN, LOW);

}

This is one of the sketches I'm using. However I just realized that when I unplug and replug it's actually not running. I thought it just wasn't displaying before, but I used this sketch to test it which should have a physical response. Nothing happens so I think it's safe to assume there's some problem with running the sketch

Not sure what you have attached to D0.
D0 (GPIO2) is a strapping pin, like D8, D9.
Please try a different pin, before I try your code.
Leo..