Arduino wont start unless COM Port is open, works as intended afterwards

Wawa:
pinMode(RxD, INPUT);
pinMode(TxD, OUTPUT);

Should these lines be there?

Where do you start softwareSerial.

blueToothSerial.begin(9600);

Leo..

That’s being called in another function called setupBluetoothConnection in the setup(), I haven’t shown the full program functions for simplicity.