Use a 302 for genuinely temporary situations: A/B testing, a short promotion, a page under maintenance, or geo-based routing where the original URL still matters. Because the move is temporary, Google keeps the original URL as the indexed one and doesn't fully transfer signals to the target.
The problem arises when a 302 is used by mistake for a permanent change — a very common misconfiguration. That can stall the migration of ranking signals and leave both URLs competing. For anything permanent, a 301 redirect is the right tool.
In modern practice Google can eventually treat a long-lived 302 like a 301, but relying on that is risky. Set the status code to match your actual intent from the start.