Mission Continuation System

Alright so right now im developing a game and it the backbone of it requires a story line and with storylines, Im gonna need missions the thing is I have missions but like I cant continuously manualy add the mission after the player has completed it, I need it to be automated so like after the player has finished the first mission, then they are given the second mission in the story line and so on until they reach the final mission and finish the game, any like modular code examples or just pseudocode examples that might be able to help me