To make floor mats stay in place, install a mat that suits the size of the car footwell. It should be neither small nor big, but it must cover the area. This prevents the mat movement when there are people in the car.
To ensure a car mat, drill a small hole in the middle of the footwell, and fix a bolt to attach the mat. While it is no good to drive many screws, 4 screws can fit.
Another method is to put tape underneath the map to stick it. The tape has a special adhesive strip on both sides. This option is more costly.
Use a heavy mat. Putting a heavy-duty carpet in the car is probably the best idea ever. These carpets withstand daily use and hold for years. Further, they are not expensive and more trustworthy. There are loads of options for every vehicle brand (not all heavy-duty mats may be compatible).
An alternative is using a non-skid rubber, spray or coating, which is put under the mat to prevent it from sliding. Some drivers use a caulk that dries and gets tacky, ensuring the carpet stays in place.
Rubberize the carpet to avoid slides. Or use rubber mats, as they stick to the floor harder than fabric mats. They do not require so much maintenance.