Mental Model
A prefix sum array stores sums of all elements up to each position, so you can quickly find the sum of any part of the original array.
Analogy: Imagine a row of buckets where each bucket holds the total amount of water collected from the first bucket up to that bucket. To find how much water is between two buckets, you just subtract the amounts in those buckets.
Original array: [2] -> [4] -> [6] -> [8] -> [10] Prefix sums: [2] -> [6] -> [12] -> [20] -> [30]
