Narrowly focusing on hate speech law, as limits on freedom of speech (in countries that purport to protect freedom of speech), there are numerous types of prohibited speech, the the prohibitions are instantiated in many ways.
Section 10 of Promotion of Equality and Prevention of Unfair Discrimination Act, 2000 says:
No person may publish, propagate, advocate or communicate words based
on one or more of the prohibited grounds, against any person, that
could reasonably be construed to demonstrate a clear intention to-
(a) be hurtful; (b)be harmful or to incite harm; (c) promote or propagate hatred.
The prohibited grounds are defined as
(a) race, gender, sex, pregnancy, marital status, ethnic or social
origin, colour, sexual orientation, age, disability, religion,
conscience, belief, culture, language and birth; or (b) any other
ground where discrimination based on that other ground- (i)causes or
perpetuates systemic disadvantage; (ii) undermines human dignity; or
(iii) adversely affects the equal enjoyment of a person's rights and
freedoms in a serious manner that is comparable to discrimination on
a ground in paragraph (a)
This conflicts with the SA Bill of Rights Section 16, which guarantees freedom of expression
(1) Everyone has the right to freedom of expression, which includes
a. freedom of the press and other media; b. freedom to receive or
impart information or ideas; c. freedom of artistic creativity; and d.
academic freedom and freedom of scientific research.
(2) The right
in subsection (1) does not extend to a. propaganda for war; b.
incitement of imminent violence; or c. advocacy of hatred that is
based on race, ethnicity, gender or religion, and that constitutes
incitement to cause harm.
Observe that the later statute outlaws "hurtful" speech, but the constitutional exception to general freedom is more narrowly limited to race, ethnicity, gender or religion which incites to cause harm. The SA law is the most restrictive law against hurtful speech that I know of.
In Sweden, Penal Code Art. 16(8) says
A person who, in a disseminated statement or communication,
threatens or expresses contempt for a national, ethnic or other such
group of persons with allusion to race, colour, national or
ethnic origin or religious belief shall, be sentenced for agitation
against a national or ethnic group to imprisonment for at most two
years or, if the crime is petty, to a fine.
First, the speech has to be communicated to others. Second, the topic-restriction is limited to race, color, national or ethnic origin or religious belief. Third, the prohibited acts are threats, and expressions of contempt (not all hurtful statements are expressions of contempt).
The Norwegian Penal Code 135a likewise says
Any person who wilfully or through gross negligence publicly utters a
discriminatory or hateful expression shall be liable to fines or
imprisonment for a term not exceeding three years. An expression that
is uttered in such a way that it is likely to reach a large number of
persons shall be deemed equivalent to a publicly uttered expression,
cf. section 7, No. 2. The use of symbols shall also be deemed to be an
expression. Any person who aids and abets such an offence shall be
liable to the same penalty. A discriminatory or hateful expression
here means threatening or insulting anyone, or inciting hatred or
persecution of or contempt for anyone because of his or her a) skin
colour or national or ethnic origin, b)religion or life stance, or c)
homosexuality, lifestyle or orientation.
The prohibited acts are somewhat different compared to Sweden (threatening or insulting anyone, or inciting hatred or persecution of or contempt for anyone), and there is a somewhat different set of protected classes. It includes insults, and does not include expression of personal contempt though does include acts that bring about contempt.
In the US, laws against hate speech would be unconstitutional per the First Amendment. Japan's constitution Art. 21 likewise says that
Freedom of assembly and association as well as speech, press and all
other forms of expression are guaranteed. No censorship shall be
maintained, nor shall the secrecy of any means of communication be
violated.
There is reportedly a law against hate speech, which does not actually ban any speech and does not penalize any speech, so it's more a legislative position statement.
Usually, laws against hate speech are limited to enumerated protected classes or topics. That way, ethnic slurs could be against the law even if the addressee didn't care, so actual harm is irrelevant. Even in the South African law, actual harm isn't part of the law, instead, you're prohibited from speech that could be construed as hurtful.
Freedom of religion might provide a basis for a special overriding of a law against hate speech. The reasoning would be that if religion Z teaches that individuals of the protected type Q are evil and must be denounced, then a law against denouncing Q restricts one's freedom to practice religion Z. And thus, if one's motivation for denouncing Q is specifically religious, a religious (and only religious) exception to the law could be created. While freedom of religion generally entails a certain freedom to act according to the teachings of a religion, they are not the same thing. For instance, freedom of religion does not create an exception to murder statutes, just in case the act is a religious human sacrifice.
In the Green case, the Swedish Supreme Court considered the issue of whether freedom speech or religion could make hate speech legal. They stated that
Both of these freedoms may be made subject to limitations embodied in
statutes, and which are necessary in a democratic society in order to
maintain public safety, protect health or morality or to defend the
rights of other persons. In general, freedom of religion can also be
restricted in order to maintain public safety, and freedom of speech
can be restricted to prevent disorder or crime, as well as to protect
a person’s good name and reputation.
Thus if a law is necessary to "protect health or morality or to defend the
rights of other persons", freedom of speech or freedom of religion can be curtailed.
Chapter 2 art. 1 of Sweden's Instrument of Government (part of the fundamental law) says
Everyone shall be guaranteed the following rights and freedoms in his
or her relations with the public institutions:
and the 6th subsection identifies
freedom of worship: that is, the freedom to practise one’s religion
alone or in the company of others.
In an explication of the Swedish Constitution, the government says
The following are absolute rights and freedoms: 1.freedom of worship:
‘the freedom to practise one’s religion alone or in the company of
others’ (IG 2:1, paragraph one, point 6)
and also
The rights and freedoms which can be limited by means of law and are
covered by qualified procedure rules are as follows:
1. freedom of expression: freedom to communicate information and express thoughts, views and opinions and sentiments, pictorially, in
writing or in any other way (IG 2:1 paragraph one, point 1)
In other words, believe what you want, but express only that which is permitted to be expressed.
The court noted that it is necessary to
determine whether the restriction is proportionate in relation to the
purpose, and whether the reasons for it are relevant and sufficient.
The court decided that the restriction on speech is not proportionate.
In a comprehensive assessment of the circumstances of Åke Green’s
case, in light of the case law of the European Court, it is at first
clear that there is no question there of the kind of hateful
statements known as “hate speech.” This even applies to his most
extreme statement, in which he describes sexual abnormalities as a
cancerous growth, as that statement, viewed in light of what he said
in connection with this in his sermon, is not something that can be
deemed to encourage or justify hatred of homosexuals. The way he
expressed himself perhaps cannot be deemed that much more derogatory
than the wording of the Bible verses in question, but must be viewed
as extreme also when considering what he was preaching to his
audience. He made his statements in a sermon to his congregation
regarding a theme found in the Bible.
Green was reporting, indeed preaching, what he believed to be contained in the Bible, and the court concluded that the act could not be deemed to encourage or justify hatred. I don't know if a relevant case has arisen in Sweden, but analogous reasoning would say that a person should not be prosecuted for giving a lecture that included reports of hate speech, again, because the lecturer would be reporting a fact about beliefs, and not encouraging or justifying hatred.