Use knapsack DP when you see these signals:
Binary choices per item. You include or exclude each element.
Additive constraints. Weights, counts, or sums that accumulate.
Optimization or counting. Maximize value, minimize cost, or count ways.
The state typically tracks your current index and remaining capacity. Time complexity is where is items and is the constraint bound. Watch for when is large. You may need different techniques.