To prevent your yoga mat from sliding on the carpet, you can try using a non-slip yoga mat or placing a grippy towel or yoga rug underneath it.