Your choice of a yoga mat depends on the type of yoga you do. There are two criteria to consider: comfort and grip.
A dynamic yoga practice does not require the same type of thickness as a more gentle style of practice. For gentle yoga styles such as hatha, yin, restorative or prenatal, which tend to focus on slower postures and being in contact with the floor, you'll want a greater level of comfort. You should choose a mat between 5 and 8 mm thick to help protect your joints.
On the other hand, if you do dynamic yoga such as ashtanga, vinyasa or in a warm room such as Bikram / hot yoga where you do lots of standing poses requiring good balance, your top priority is stability and plenty of grip so that you don't slip. The best thing is therefore a thinner mat, between 1 and 5 mm maximum. You can also add a thin pure rubber mat for maximum grip, especially for asanas like downward-facing dog.