The country whose flag a car carrier flies, and the registry that runs it: it issues the ship's statutory certificates, sets crew and labor rules, investigates its casualties, and charges registration and tonnage fees.
Ship flag registries are one player in the car carrier ships industry, and an industry of their own, with their own suppliers, customers, software, regulators, and money flows. This full map is on the roadmap.
Meanwhile: how ship flag registries fit into car carrier ships