Arduino disconnecting from Serial Monitor / Unable to connect to COM port

I'm writing a sketch using the Wire.h library and I'm having trouble with the serial monitor. As soon as the upload of my sketch is finished, Windows makes the 'device disconnected' sound and my Arduino Nano 33 BLE disconnects from my laptop. While first debugging this, I was not able to get my computer to recognize the Arduino by plugging it in via USB at all, but after a lot of troubleshooting I learned I could get it to recognize the Arduino by pressing the reset button twice in succession; simply pressing it once does nothing to detect the device. When I try to upload my sketch, the upload succeeds, but I am unable to access the serial monitor, and it displays

Error opening serial port 'COM3'.(Port not found)

I'm running Windows 10 and the Nano 33 BLE is brand new. I was able to successfully run the Blink example sketch on the board with no errors, even though it disconnects after upload, but my sketch using Serial functions does not print to the terminal since the serial monitor disconnects right after upload completes. I've read that connecting a 100 Ohm resistor between the RESET pin and 5V, or connecting a capacitor between RESET and GND would fix this, but I tried both and neither would work. I've also uninstalled and reinstalled the drivers multiple times to no avail. I've also tried the loopback test, but once I connect the board to my computer nothing happens and no device-insertion tone is sounded. I don't believe I fried my board or anything yet, as I haven't done much in terms of connecting hardware to the board yet.

I'm not familiar with the Nano33 BLE.

The Nano33 BLE uses native USB as far as I can see so the disconnect/connect sounds are normal.

You can check what happens in Windows Device Manager; a connected device with native USB will say something like COM3 (Nano33 BLE); when you press the reset button or try to upload, it will change to e.g. COM4 (Nano33 BLE bootloader).

After the upload is successful or the bootloader timed out, it should go back to COM3 (Nano33 BLE).

For your problem, make sure that Windows Device Manager indeed says COM3 (Nano33 BLE); if it's another port, adjust the port in the IDE.

bhayame:
I've read that connecting a 100 Ohm resistor between the RESET pin and 5V, or connecting a capacitor between RESET and GND would fix this, but I tried both and neither would work. I've also uninstalled and reinstalled the drivers multiple times to no avail. I've also tried the loopback test, but once I connect the board to my computer nothing happens and no device-insertion tone is sounded.

Please provide links to what you found if the below is not satisfying.

I doubt very much that those instructions apply to the Nano33 BLE. I'm quite sure that they were written for the original AVR based boards like Uno, Nano and Mega.

For the normal loopback test you will have to keep the processor in reset. In this case it means that your processor (that is handling the communication with the PC) is not running and and hence the PC will not detect it.