nip it in the bud

To nip it in the bud means to put a stop to something while it is still in early development. The phrase refers to a bud as in a flower bud such as from a rose which is still in its early stages of development. This idiom is used figuratively in relation to a situation which has potential risks or problems that could arise; by stopping it in the early development stages you have the ability to prevent these potential issues.