Start with CSES Tree Distances II. It is the cleanest rerooting problem with no edge cases. Once you solve it, try LeetCode (same problem, -indexed). Then move to problems where the combine function is not sum.
For each problem, follow this process: write the down pass first and verify it gives the correct answer for the root. Then add the up pass and verify on a small example by hand. Only then submit.
Aim to solve rerooting problems. After that, the two-pass pattern becomes automatic and you can focus on designing the right down[v] and up[v] for each new problem.