Run a function inside other function

I am trying to make the classic brick breaker game, and i’m stuck at the part that when i lose a life, the game gets back to the beginning, except with one less life. Does anyone know how to make this?