Program disappear after power off

Hi all, I am building a midi controller for my guitar effect, I used a Arduino Uno to connect 6 button to send midi signal to the effector.

And I wrote a program and it works after I upload it to the Arduino Uno, but after I disconnect the power and turn it on again, I find that the program does not function, how can I solve it, plz help

Here is the code:

#include<MIDI.h>

MIDI_CREATE_DEFAULT_INSTANCE();

void setup() {

pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
pinMode(4, INPUT_PULLUP);
pinMode(5, INPUT_PULLUP);
pinMode(6, INPUT_PULLUP);
pinMode(7, INPUT_PULLUP);
MIDI.begin(MIDI_CHANNEL_OMNI);

}

void loop() {

if (digitalRead(2) == LOW) {
MIDI.sendProgramChange(120, 1);
delay(200);
}

if (digitalRead(3) == LOW) {
MIDI.sendProgramChange(121, 1);
delay(200);
;
}

if (digitalRead(4) == LOW) {
MIDI.sendProgramChange(122, 1);
delay(200);

}

if (digitalRead(5) == LOW) {
MIDI.sendProgramChange(123, 1);
delay(200);

}

if (digitalRead(6) == LOW) {
MIDI.sendProgramChange(124, 1);
delay(200);

}

if (digitalRead(7) == LOW) {
MIDI.sendProgramChange(125, 1);
delay(200);

}
}

What is the power source when you send a program to the Uno, what is the power source when you do not send a program to the Uno?

Idahowalker:
What is the power source when you send a program to the Uno, what is the power source when you do not send a program to the Uno?

Idahowalker:
What is the power source when you send a program to the Uno, what is the power source when you do not send a program to the Uno?

I send the program with usb only, and I try usb or power supply(12V), both not function