Code Doesn't Run OSEPP UNO R3 PLUS

when I plug my board into my computer and run any code it works. But, after the code finished downloading and I unplug my board so that it can move freely it stops moving, then when I plug it back it starts again. Basically, the code doesn't work on my board (connected to a car) after it is unplugged from the computer. How do I fix this?

How is your board connected to your car?

it is connected with cables to a motor driver via the digital pins on the board