Does a lawyer always get paid in a contingency fee case?

No. Not all claims or lawsuits for injuries, death or other losses result in a recovery, and if there is no recovery, neither the client nor the lawyer get paid.
That’s why I carefully study the facts and do research before taking a case. I want to take only cases where I believe my client will recover and I will get paid. Even then there is no guarantee, not all cases result in settlements or verdicts for the injured party.