Start with the simplest cases. If you have zero items, the best value is zero regardless of capacity: for all from to . If you have zero capacity, you can't take anything: for all from to .
These base cases fill the first row and first column of your DP table. Everything else builds from here. This is where recursion stops. Without it, you get infinite recursion and a stack overflow. Every recursive solution needs at least one base case.