The Messenger of Allah (ﷺ) said: If anyone hears a man crying out in the mosque about something he has lost, he should say: May Allah not restore it to you, for the mosques were not built for this.
Sahih Muslim Book 5, Hadith 98