The same way you change any program’s flow with a button.
What do you already know about using a button to do anything, like turn on and off an LED?
Post your code so far. If you have no code, worrying about the button is premature. If you do have code, show us and also your best idea about where a button might enter into things.
a7