How to add a method to the Update function upon callback

Hello, I’ve got a quick beginner question here.

I’ve got a function that I need run every frame, so that’s what the Update function is for. But I need the method to start running only after I receive a message callback.

So… here’s the pseudocode.

void CallBack()
{
  Something here??
}

void Update()
{
   Something here?
}

void Run()
{
  do stuff
}

private bool doMyStuff = false;

void CallBack()
{
    this.doMyStuff = true;
}

void Update()
{
	if(this.doMyStuff) {
		// Do my stuff here
	}
}