For the record, I think it is deplorable to torture and execute people because of what they do or do not believe about God.
Nevertheless, that was the way heresy was dealt with in the Judeo-Christian world from the time of Moses until just a few centuries ago.
This is not the case.
In Old Testament Israel, ... persons might be put to death for behavior, ... which sometimes included the teaching of what was considered false doctrine, ... but not for belief alone.
That is what is commonly referred to as a “distinction without a difference” because until a person in some way expresses their beliefs we have no idea what they are.