To dangle a carrot in front of someone

to persuade someone to do something by offering some kind of reward

e.g. my son would not revise so I told him he could have a new pair of trainers if he passes all of his exams. Dangling a carrot in front of him seems to have worked; he has done a lot of revision since!

The idiom “to give someone a carrot” is often used instead.
Also, you can “use/dangle a carrot and a stick” meaning the promise of reward and the threat of punishment