This is the 70th most frequent Japanese word.
なり
"なり" can mean "form," "state," "appearance," or function as a particle indicating "as soon as" or "or something like."
In this sentence, なり expresses an immediate reaction to an event, indicating spontaneity.
結果を聞くなり、彼は喜んで飛び上がった。
As soon as he heard the results, he jumped up with joy.
This instance of なり proposes two options for taking an action, emphasizing a proactive approach.
電話するなりメールするなりして、連絡をください。
Please contact me either by calling or emailing.
Here, なり is used to suggest an alternative action, implying either one or the other.