What did you learn? Prefix sums and difference arrays are inverses. One undoes the other.
Prefix sums enable fast range queries. Difference arrays enable fast range updates.
Choose based on your workload. Many queries, few updates? Use prefix sums. Many updates, one final read? Use difference arrays. You now have two tools. Next, I'll show you a technique that doesn't require any preprocessing at all.