It is narrated on the authority of 'Amir Ibn Rabi'a (RA) that the Prophet (ﷺ) said: Whenever you see a funeral procession, stand up for that until it moves away or is lowered on the ground.
Hadith ReferenceSahih Muslim / The Book of Prayer - Funerals / Hadith: 958