They are a separate product from the floor carpet, and on many vehicles the two are sold independently.
A cargo mat is replaced when it has worn through at the loading edge, when a spill has soaked a carpeted one, or when the vehicle is being prepared for sale and the original mat is missing. Rubber liners crack at the fold when they are old, and a cracked liner lets water through to the carpet beneath, which defeats the purpose.
Match by body style and by floor position. A mat for a vehicle with a sliding load floor is different from one without, and the mat for a three-row vehicle changes depending on whether the third row is folded. Check the dimensions and the retention points before ordering.