Path queries split into two types: computing values on a path (sum, max, XOR) and counting paths that satisfy constraints (length k, sum s, etc.).
If you are computing values on a path, use LCA or HLD. These tools decompose paths into segments and combine segment results.
If you are counting how many paths have a certain property, use Centroid Decomposition. Centroid splits the tree recursively, making it easy to count paths through each centroid without double-counting.