The Messenger of Allah ﷺ said: Going round the House (the Ka'bah), running between as-Safa and lapidation of the pillars are meant for the remembrance of Allah. (Using translation from Abū Dāʾūd 1888)
قَالَ رَسُولُ اللهِ ﷺ إِنَّمَا جُعِلَ الطَّوَافُ وَالسَّعْيُ بَيْنَ الصَّفَا وَالْمَرْوَةِ وَرَمْيُ الْجِمَارِ لِإِقَامَةِ ذِكْرِ اللهِ ﷻ