Learn Apex
Recursion prevention
Updating records inside a trigger can fire the trigger again — a loop. Guards (static flags, processed Id sets) stop the second wave when you intend a single pass.
Guards
Static guard

Tap “Simulate save” — toy model: with a guard, each click adds 1 pass. Without a guard, each click adds 4 (simulated cascade).

Cumulative “trigger passes” (toy)

0

Common static guard
public class OppTriggerHandler {
    private static Boolean ran = false;
    public static void run() {
        if (ran) return;
        ran = true;
        try {
            // updates that might re-fire trigger
        } finally {
            ran = false;
        }
    }
}

Also consider: one-time Id sets, workflow-off patterns, and platform events — pick what matches your architecture.