"The Salah was enjoined on the lips of the Prophet ﷺ, four Rak'ahs while resident, and two while traveling, and one Rak'ah during times of fear." (Using translation from Nasāʾī 456)
«وَفُرِضَتِ الصَّلَاةُ عَلَى لِسَانِ النَّبِيِّ ﷺ فِي الْحَضَرِ أَرْبَعًا وَفِي السَّفَرِ رَكْعَتَيْنِ وَفِي الْخَوْفِ رَكْعَةٌ»