"The prayer of the resident was enjoined on the tongue of your Prophet ﷺ, four (rak'ahs), and the prayer of the traveler is two rak'ahs, and the prayer of fear is one rak'ah." (Using translation from Nasāʾī 1441)
«فُرِضَتْ صَلَاةُ الْحَضَرِ عَلَى لِسَانِ نَبِيِّكُمْ أَرْبَعًا وَصَلَاةُ السَّفَرِ رَكْعَتَيْنِ وَصَلَاةُ الْخَوْفِ رَكْعَةً»