The shaqq means that a trench is dug in the middle of the grave to suit the size of the deceased, and its sides are built with bricks so that it will not collapse on the deceased, and the deceased is placed in it on his right side facing the qiblah, then this trench is covered with stones or the like and the ceiling is raised a little so that it will not touch the deceased, then the soil is filled in.
The lahd (niche) means that a place is dug at the bottom of the grave on the side that is closest to the qiblah, in which the deceased is placed on his right side facing the qiblah, then this hole is filled in with bricks behind the deceased, then the dirt is filled in.
See: Ahkaam al-Maqaabir fi’l-Sharee’ah al-Islamiyyah (p. 30) by Dr. ‘Abd-Allaah al-Suhaybaani.
Both the lahd and the shaqq are permissible according to scholarly consensus, but the lahd is preferable, because this is what was done with the grave of the Messenger (peace and blessings of Allaah be upon him). Muslim (966) narrated that Sa’d ibn Abi Waqqaas (may Allaah be pleased with him) said, during the illness of which he died: Make a lahd (niche) for me, and set up bricks over me, as was done for the Messenger of Allaah (S).
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni (2/188): The Sunnah is to make a lahd in the grave, as was done with the grave of the Prophet (peace and blessings of Allaah be upon him). End quote.
Al-Nawawi (may Allaah have mercy on him) said in al-Majmoo’ (2/252): The scholars are unanimously agreed that burial in the lahd and burial in the shaqq are both permissible, but if the ground is stable and the soil will not collapse then the lahd is preferable, but if it is unstable and will collapse, then the shaqq is preferable. End quote.
Ibn ‘Uthaymeen (may Allaah have mercy on him) said in al-Sharh al-Mumti’ (5/360): But if there is a need for the shaqq, then there is nothing wrong with it. The shaqq may be needed if the ground is sandy and it is not possible to build the lahd, because when a lahd is made in sand it will collapse. So a hole should be dug and a trench should be dug in the middle of it, and the bricks should be placed over both sides of the hole in which the deceased is placed, so that the sand will not collapse, then the deceased should be placed between these two bricks. End quote.
Based on this, the soil should not be filled in directly on the face or body of the deceased, whether the grave is a lahd or a shaqq, because in the lahd the deceased is placed in the niche which is dug in the wall of the grave, and the soil is not filled in above him. In the shaqq, the soil is filled above the roof of the shaqq, and not directly on top of the deceased.
And Allaah knows best.