From these ahadith, it is understood that performing prostration (sajdah) on the ground or on soil is not a necessary condition. The Noble Prophet sallallahu alayhi wa sallam performed prayer and prostrated on a khumrah (a small mat), on a mat or a woven mat, and even on his bed. Therefore, there is no harm in praying on a prayer rug, mat, musalla, or carpet. However, it is better if the prayer rug or similar items do not have designs or patterns. And Allah knows best.
May Allah Ta’ala grant everyone the ability to follow the Sunnah.