Assalamualaikum ustaz. When there is an empty space in a prayer saf, who should fill the space? Should the person from the back go to the front of the person from the left or right move to fill it?
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
The act of straightening and filling the saf is sanctioned act before a person starts to pray. The reason is there are numerous hadiths that narrate the advantages of doing so. Moreover, this action is included as one of the sunnah before praying. (See al-Taqrirat al-Sadidah, pg. 236)
In the issue of filling an empty space in a saf, we can divide it into two situations as follows:
First: There are still a lot of empty spaces (gaps)
If the saf has yet to be filled due to the low number of congregants, then the position in the saf is as the following:
Imam is in the middle of the saf. This is based on a narration from Abu Hurairah RA, where Rasullullah PBUH said:
وَسِّطُوا الإِمَامَ وَسُدُّوا الْخَلَلَ
“Have the imam in the centre and close up the gaps.” 
While the makmum should fill the positions behind the imam right and left and it is prioritized to fill the right side of the saf. This is in accordance with a hadith narrated by ‘Aisyah RA where Rasullullah PBUH said:
إِنَّ اللَّهَ وَمَلاَئِكَتَهُ يُصَلُّونَ عَلَى مَيَامِنِ الصُّفُوفِ
“God and His angels bless those who are on the right flanks of the rows.” 
Syeikh Syams al-Haq al-‘Azim Abadi explained: “In the hadith, it is mentioned that the istihbab (instruction) to be on the right side of the first row and the safs following it.” 
This shows that the position of makmum is behind the imam is prioritized as well as the right side of the saf and this is sunnah.
Second: There is no other space
Whereas, when the saf is already filled and a gap is formed when there is a congregant who mufaraqah (separate) from the prayer due to certain reasons or others, then who should fill the space? Should the congregant at the back step forward of the congregant beside the empty space fill it?
Hence, we state that in this situation, the gap should be filled and not left empty. This is as stated by the Messenger PBUH:
“And close up the gaps.” 
Likewise, it is also stated in a hadith narrated by Abdullah Ibn Umar RA, Rasullullah PBUH said:
وَلاَ تَذَرُوا فُرُجَاتٍ لِلشَّيْطَانِ وَمَنْ وَصَلَ صَفًّا وَصَلَهُ اللَّهُ وَمَنْ قَطَعَ صَفًّا قَطَعَهُ اللَّهُ
‘‘Set the rows in order, stand shoulder to shoulder, close the gaps, be pliant in the hands of your brethren, and do not leave openings for the devil. If anyone joins up a row God will join him up, but if anyone breaks a row God will cut him off.” 
The above hadith warns against leaving the gaps empty. The advantage of those who close the gaps and fill the space is that Allah will enjoin him with His blessings. While for those who leave the gaps empty, cutting the saf will be cut off from the blessing and ‘inayah of Allah SWT.
While in another hadith narrated by Anas bin Malik RA< it is stated that Rasullullah PBUH said:
سَوُّوا صُفُوفَكُمْ فَإِنَّ تَسْوِيَةَ الصُّفُوفِ مِنْ إِقَامَةِ الصَّلاَةِ
“Straighten your rows, for the straightening of the rows is part of the perfection for prayer.” 
The above hadith is one of the commandments to straighten the saf in prayer, it is a sign of the perfection and accuracy of the prayer performed. Furthermore, there is even a parable of Rasullullah PBUH straightening the saf of the companions as straight as an arrow. This is based on a hadith narrated by Nu’man bin Basyir RA, he said:
كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُسَوِّي صُفُوفَنَا حَتَّى كَأَنَّمَا يُسَوِّي بِهَا الْقِدَاحَ
“God’s Messenger used to straighten our rows as if he were trying to make them as straight as arrows,” 
This hadith is a guide for us that the straightness of a saf is the same as arrows.
To conclude, we would like to state that the main issue here is the straightness of the saf and the commandment of filling the empty spaces in a saf. All of it depends on the fiqh (understanding) of the makmum present. If the makmum who is in the same saf find that there is no one from the saf behind filling the saf, then he should fill it either by moving to the right or left filling the space. For in this situation, filling the gap is the priority. Wallahu a’lam.
However, if the makmum from the saf behind see that there is a space in front of him, then he should immediately fill the space moving forward to attain the fadhilat of hastening towards good and joining the saf. May Allah grant us understanding to us all in religion.
Our answer here is when the COVID-19 pandemic is not spreading rampantly and in a normal situation. However, when COVID-19 with a high rate of infection is present, then the permissibility fatwa to distance the saf has been issued.