Insurance companies can obtain the right of recourse after claiming compensation from the injured party and claim compensation from the responsible person. If the insurance company does not pay, it has no right to claim compensation, which is the right given to the insurance company by law. If the injured party sues the insurance company as a co-defendant, and if the court decides that the insurance company should make compensation according to the insurance contract, the insurance company can recover from the responsible person alone, but there are also cases where the insurance company cannot recover, depending on the specific case.
Further reading: How to buy insurance, which is good, and teach you how to avoid these "pits" of insurance.