The function of the introductory word in sentence 2 is to make a transition between two different ideas.
A transition is a term to refer to the words that introduce a new idea in a text.
According to the above, the word meanwhile is a transition word because it introduces what was happening in another place other than the one already described in the first sentence.
In this case, this transition serves to add more information to the story and introduce the reader to another context.
Learn more about transition in: https://brainly.com/question/14274301