Milord
Sex is an human activity. It cannot be forbidden.
All sorts of "human activities" are forbidden. We've been codifying the practice since the days of Hammurabi.
Murder. Cannibalism. Talking in the theater. Driving faster than an arbitrary number. Usurping the means of production away from the working class.
Specific to sex, I cannot think of a single human activity which has historically had as many proscriptions levied against it as sex has. In most parts of the world it still does.
People have been prohibited from engaging in sex on the basis of marital status, religion, age, national origin, race (miscegenation was illegal in 16 US states up until 1967. 56 years is not a long time ago,) sexual orientation, culture, class, caste, wealth, dowry, virginity, citizenship, tribe, group affiliation, and all manner of other reasons that people can think up.
because it’s impossible to prohibit it in a non tyrannical or not religious state.
You don't need "tyrannical governments" to do this, because groups of people always end up doing it to themselves. People become their own worse jailers. Especially when the prison is in your own mind. We are all enslaved by cultural practices that we cannot see beyond.