I notice that you have tagged the post "female gourami", so definitely she is not pregnant - she is an egg-laying fish. If she is "gravid", ie filled with eggs, she will be noticeably swollen around the abdomen.
Many species of gourami are bubble-nesters, their eggs do not get deposited on the substrate, they build a nest of bubbles on the surface, so if your gourami is one of those species, then digging in the sand is not a courtship ritual. Regardless, if they start to "dance" with each other, and the male tries to wiggle next to her, that is part of the mating process.