Psalm 24 (L’David Mizmor) was written by Dovid HaMelech to be recited at the inauguration of the Bais HaMikdash. It speaks about how Hashem’s Presence fills the entire world. Dovid knew when the Temple would stand, it would be concentrated in the Holy of Holies – the Holy Ark that was built in the desert under Moshe’s instructions. This is the reason we recite this Psalm when we return to the Torah to the Holy Ark on days when the Torah is read (except on Shabbos mornings).