´Narrated Abu Hurairah:` that the Messenger of Allah (ﷺ) said: "When one of you arrives at the gathering, then give the Salam, and if he is given a place to sit, then let him sit. Then when he stands, let him give the Salam, the first is more worthy than the last."
Hadith Referenceسنن ترمذي / كتاب الاستئذان والآداب عن رسول الله صلى الله عليه وسلم / 2706