How do you know if greedy will work? Look for these signs:
The problem asks for maximum, minimum, or optimal something.
You can order or sort the input in a meaningful way.
Making the locally best choice does not block better future choices.
The problem has a natural "take it or leave it" structure. If all four apply, try greedy first. If you find a counterexample where greedy fails, switch to DP. Common bug: forgetting to check if your greedy choice leads to optimal results. Test on examples where greedy might fail.