Set some boundaries
As INSEAD Knowledge states, subordinates suffering from overinflated egos should not be given any more privileges than others. You need to set clear boundaries and clear rules that everyone must follow, including overconfident workers.
Bring the subordinate back down to earth
Do not be afraid to raise the subject of overconfidence in an individual meeting with the given subordinate. Acknowledge that the subordinate has some undeniable qualities, but in matters where they go too far, so to speak, remind them that you are the manager, that other colleagues may have more experience with the agenda, and that the subordinate should show some humility.
Do not be drawn into the games and world view of the subordinate
Egotistical subordinates may have a tendency to elevate themselves above others and play political, diplomatic and psychological games with colleagues and superiors. Do not get drawn into these games or allow an overconfident worker to draw other team members into them either.
Give the subordinate some (even if fake) space for their own initiative
To some extent, you can "get rid" of an overly ambitious and overconfident subordinate by giving them certain powers which satisfy their need to feel important, but have no real impact and do not allow them to decide on things they should have no say in.
Do not let things go too far
If the situation does not improve and the egotist in question is still stirring up trouble and making a fuss in your team, do not take the situation lightly. You should not hesitate to take up the issue with the HR department, company management or legal department if the person's behaviour exceeds acceptable limits.
-mm-