After Hijrat to madina, what first important thing was done by the Holy prophet (SAW)?

After Hijrat to madina, what first important thing was done by the Holy prophet (SAW)?

ہجرت مدینہ کے بعد رسول اللہ صلی اللہ علیہ وسلم نے سب سے پہلے کون سا کام کیا؟
Explanation

The Holy Prophet (SAW) first built a mosque for prayers, Masjid-e-Nabawi.

It is served as a center for religious, social, and political activities, uniting the Islamic community.

This mosque was built with the help of the Ansar (helpers) and Muhajirun (migrants) and was completed in the first year of Hijra (622 CE).