Some verses to consider on this point:
Jesus - MT 18:15-17 “If your brother sins against you, go and tell him his fault, between you and him alone. If he listens to you, you have gained your brother. But if he does not listen, take one or two others along with you, that every word may be confirmed by the evidence of two or three witnesses. If he refuses to listen to them, tell it to the church; and if he refuses to listen even to the church, let him be to you as a Gentile and a tax collector.
Jesus - REV 2:5-6 “Realize how far you have fallen. Repent, and do the works you did at first. Otherwise, I will come to you and remove your lampstand from its place, unless you repent. But you have this in your favor: you hate the works of the Nicolaitans, which I also hate.”
Jesus - REV 2:14-16 "Yet I have a few things against you. You have some people there who hold to the teaching of Balaam, who instructed Balak to put a stumbling block before the Israelites: to eat food sacrificed to idols and to play the harlot. Likewise, you also have some people who hold to the teaching of [the] Nicolaitans. Therefore, repent. Otherwise, I will come to you quickly and wage war against them with the sword of my mouth.
Jesus - REV 2:19-21 " Yet I hold this against you, that you tolerate the woman Jezebel, who calls herself a prophetess, who teaches and misleads my servants to play the harlot and to eat food sacrificed to idols. I have given her time to repent, but she refuses to repent of her harlotry. So I will cast her on a sickbed and plunge those who commit adultery with her into intense suffering unless they repent of her works.
St. Paul - ROM 16:17-18 I appeal to you, brethren, to take note of those who create dissensions and difficulties, in opposition to the doctrine which you have been taught; avoid them. For such persons do not serve our Lord Christ, but their own appetites, and by fair and flattering words they deceive the hearts of the simple-minded.
St. Paul - 1 COR 5:1-2 It is actually reported that there is immorality among you, and of a kind that is not found even among pagans; for a man is living with his father’s wife. And you are arrogant! Ought you not rather to mourn? Let him who has done this be removed from among you.
St. Paul - 1 COR 5 11-13 But I now write to you not to associate with anyone named a brother, if he is immoral, greedy, an idolater, a slanderer, a drunkard, or a robber, not even to eat with such a person. For why should I be judging outsiders? Is it not your business to judge those within? God will judge those outside. “Purge the evil person from your midst.”
St. Paul - 2 COR 6:14-18 Do not be yoked with those who are different, with unbelievers. For what partnership do righteousness and lawlessness have? Or what fellowship does light have with darkness? What accord has Christ with Beliar? Or what has a believer in common with an unbeliever? What agreement has the temple of God with idols?
St. Paul - EPH 5:6-8 Let no one deceive you with empty words, for it is because of these things that the wrath of God comes upon the sons of disobedience. Therefore do not associate with them, for once you were darkness, but now you are light in the Lord.
St. Paul - 2 THES 3:14 If anyone does not obey our word as expressed in this letter, take note of this person not to associate with him, that he may be put to shame.
St. Paul - 2 TIM 3:1-5 But understand this: there will be terrifying times in the last days. People will be self-centered and lovers of money, proud, haughty, abusive, disobedient to their parents, ungrateful, irreligious, callous, implacable, slanderous, licentious, brutal, hating what is good, traitors, reckless, conceited, lovers of pleasure rather than lovers of God, as they make a pretense of religion but deny its power. Reject them.
St. Paul - TITUS 3: 10-11 After a first and second warning, break off contact with a heretic, realizing that such a person is perverted and sinful and stands self-condemned.
St. John - 2 JN 9-11 Anyone who is so “progressive” as not to remain in the teaching of the Christ does not have God; whoever remains in the teaching has the Father and the Son. If anyone comes to you and does not bring this doctrine, do not receive him in your house or even greet him; for whoever greets him shares in his evil works.
St. Jude - JUDE 17-23 But you, beloved, remember the words spoken beforehand by the apostles of our Lord Jesus Christ, for they told you, “In [the] last time there will be scoffers who will live according to their own godless desires.” These are the ones who cause divisions; they live on the natural plane, devoid of the Spirit. But you, beloved, build yourselves up in your most holy faith; pray in the holy Spirit. Keep yourselves in the love of God and wait for the mercy of our Lord Jesus Christ that leads to eternal life. On those who waver, have mercy; save others by snatching them out of the fire; on others have mercy with fear, abhorring even the outer garment stained by the flesh.