Leaders are responsible for their team's success, and when an individual's behavior is negatively affecting this, it's important to address it carefully. In many cases, it may be best to speak privately to the person or observe their behavior and other team members’ reactions until there is enough evidence that the situation needs to be addressed. When dealing with a toxic team member, addressing the issue publicly in front of the entire team can lead to further distracting tensions and animosity among group members.
It’s a much better proactive approach to try and find a solution through a one-to-one discussion or even waiting patiently until you have concrete proof that it harms the smooth running of the team. Once there is enough evidence that an individual or an issue needs to be resolved, it becomes more reasonable to bring out the matter in front of the whole team.
MOre info: What is Spear Phishing?