If you nip something in the bud, you stop it before it has any chance to develop into something much bigger.
A flower starts out as a bud. If you pinch, or nip the bud, you prevent the plant from becoming a full flower.
"Developers were planning on tearing down the old building, but protesters nipped the plan in the bud by having the building declared a historical site."