In setup() you probably have something like
Serial.begin(9600);
while (!Serial);
This means that the code will wait forever until the USB serial is present.
What you should have is something like
Serial.begin(9600);
while (!Serial &&...
Your sketch very likely contains a line in your setup() function like while (!Serial) {}. This line will cause your Teensy to wait forever until a serial connection is available for your Teensy to put out any status. When you connect the USB...
The Teensy 4.0 runs a program as soon as I plug in the USB cable. However, if it is powered via 5v and GND and the USB cable is not plugged in, it doesn't run the program. I have verified the 5v is present at the teensy and the 3.3v is also...