I am very aware that this is a deep question and I am really not an expert in Islam or Muslims, though I have tried to do my research. I know that Islam is the second-largest religion, I don't see why this wouldn't be part of my story in one form or another and should also be respectfully represented.
The history of the story is that the Earth gets destroyed and there is a surviving population of 19 million of that that settles on a new homeworldhome-world. It'll be a clash of cultures and religions for a time, some would die out, some would survive on. Religion would also be a strong factor for cultures as a means of finding stability in their faith in that time and for generations after.
I've done some research on Muslims who have been a part of space missions to get a perspective of how religion (and their acts of worship) would advance when touching into the space-faring era which has given me some insight but then I realisedrealized that in Islam's rituals, such as Qibla; their direction of prayer (salah). They pray towards the Kaaba in Mecca all over the earth.
But if the earth was destroyed (and what's left a molten shard), I don't know how Islam or Muslims would adapt some of their rituals to ensure that their culture and faith is kept alive for future generations. To where the question would come in.
How would Muslims adapt to follow their prayer rituals in such a traumatic loss?