I’m surprised you’re so fixated on those 2 doctrines. Especially since both are in scripture.
But let’s start out with definition
2089"*Heresy *is the obstinate post-baptismal denial of some truth which must be believed with divine and catholic faith, or it is likewise an obstinate doubt concerning the same;
Are you baptized?
How does Paul deal with someone who is baptized AND guilty of heretical beliefs?
(link is operational)
[
Titus 3:10 (
Titus 3:10 RSVCE - As for a man who is factious, after - Bible Gateway)
“As for a man who is factious ( [
α (
http://bibleapps.com/greek/141.htm)
ἱρετικὸ****ν heretic ), after admonishing him once or twice, have nothing more to do with him, 11 knowing that such a person is perverted and sinful; he is self-condemned.”
"Some excommunications, however, are
automatic (effective at the moment the act is committed) and without the intervention of the Church. Catholics are automatically excommunicated for committing these offenses:
- Procuring of abortion
- Apostasy: The total rejection of the Christian faith.
- Heresy: The obstinate post-baptismal denial of some truth, which must be believed with divine and Catholic faith.
- Schism: The rejection of the authority and jurisdiction of the pope as head of the Church.
- Desecration of sacred species (Holy Communion)
- Physical attack on the pope
- Sacramental absolution of an accomplice in sin against the Sixth and Ninth Commandments
- Unauthorized episcopal (bishop) consecration
- Direct violation of confessional seal by confessor"
From
dummies.com/how-to/content/catholicism-excommunication-and-other-penalties.html