In Esther (5:9), when Haman leaves the king's palace after Queen Esther's first party, all happy and feeling on top of the world, gets very upset when he sees Mordechai sitting there, and not bowing to him. However, he controls himself (5:10), and complains to his wife and friends when he gets home.
Why would he restrain himself? He has the king's ear (and ring), he's likely the most powerful in the country after the king and queen (who both, as far as he knows, really really like him); why doesn't he order Mordechai's death right then?
Rashi on that verse kinda answers the question, but not really:
ויתאפק . נתחזק לעמוד על כעסו כי היה ירא להנקם בלא רשות , ויתאפק , אישט''ניר בלע''ז
restrained himself: He strengthened himself to control his anger because he was afraid to take revenge without the sanction of the king. וַיִתְאַפַּק is eseretint in Old French, and he controlled himself.
(Sefaria Hebrew, Chabad translation)
The reason I don't think that this fully answers the question is because the king is not only a friend of Haman's, but he also gave him his ring -- Achashverosh trusted him so much that he gave him carte blanche to say whatever he wanted in the king's name. Haman may as well have written an edict ordering Mordechai's death, and then carried it out.
What made Haman control himself, in Esther 5:10?