Once a matter has been decided, the law limits how often it can be relitigated. Two doctrines do that work and they are frequently confused.
Res judicata (claim preclusion) bars a second action on the same claim between the same parties where there was a final judgment on the merits. Crucially it bars not only what was litigated but what could have been — which is why splitting related theories across two lawsuits is dangerous.
Collateral estoppel (issue preclusion) bars relitigating a specific issue of fact or law that was actually litigated, actually decided, and necessary to a prior final judgment. It can apply even where the claims differ.
Points that decide cases: whether the prior judgment was on the merits — a dismissal for lack of jurisdiction generally is not; whether the issue was actually decided rather than assumed; whether the party had a full and fair opportunity to litigate it; and, for issue preclusion, whether the doctrine may be used by someone who was not a party to the first case, which jurisdictions treat differently.
Practical consequence. Bring related claims together. A party that holds one back for a second action usually loses it, and the loss is procedural rather than substantive.