Five parents wanted to withdraw their children from the mandatory lessons from the start of the new term or stop the rollout of RSE altogether in Wales.
At the High Court, judge Mrs Justice Tipples said an injunction would cause "very substantial disruption" just days before the start of a new term.
A judicial review already granted to the group is scheduled for November.
Lawyers on behalf of the parents argued the new RSE code would amount to "indoctrination" but the Welsh government has insisted lessons will be "developmentally appropriate".
The code is a mandatory part of the new curriculum for Wales which primary schools and some secondary schools have to deliver from September and from which parents are not able to withdraw their children.
The Welsh government said it was confident the reforms were "proportionate and lawful".
Mrs Justice Tipples questioned the delay in bringing the application for an injunction to the court and said there was a "very strong public interest" in continuing with implementing the new curriculum from next week.
Relationships and sexuality education is a cross-cutting element of the Curriculum for Wales which becomes statutory for all primary schools and year 7 in some secondary schools from the start of the September term.
The judge accepted the matter being tried was "a serious issue" but she also ruled that there were no legal provisions on which she could direct ministers to block RSE.
She ordered that the claimants paid the Welsh government's legal costs.
In submissions to the judge on Wednesday, barrister Paul Diamond, representing the five parents, said they were "fighting for their children", likening it to a "David and Goliath" conflict.
He argued the approach to RSE would impose "a particular moral viewpoint" and he accused Welsh ministers of "extremism and intolerance".
"We are talking about the most extreme ideological imposition on children in this country," Mr Diamond said.
He conceded it was "a very big ask to suspend an act of the Welsh Parliament", adding "the issues cannot be more fundamental to our society".
The Welsh government says RSE should cover themes such as rights and equity; sex, gender and sexuality; bodies and body image; sexual health and well-being; and violence, safety and support and it should develop understanding of different identities including LGBTQ+ lives.
The RSE Code states content must be "developmentally appropriate" so the youngest children might learn about "asking for permission to share materials, for example toys; or learning about respecting personal boundaries".
It does not specify exact topics but identifies themes to be covered for different ages.
But campaigners under the banner of Public Child Protection Wales claim it could mean that children are exposed to inappropriate themes and material from the age of three.
On behalf of Welsh ministers, barrister Emma Sutton said the purpose of RSE was to help pupils develop "as healthy, confident individuals by providing them with developmentally appropriate teaching that will give them a proper understanding of relationships and sexuality".
"It has an emphasis on rights, equality, equity, and it seeks to enable pupils to understand and respect differences and diversity," she added.
Ms Sutton said it was "too late" for claimants to come to the court with their request the week before the curriculum becomes statutory.
Allowing the injunction was likely to have "a significant impact on the implementation of the curriculum", she added.
Last week, the public were cleared from a special meeting of Gwynedd council when a discussion about the policy "erupted into chaos".
Education Minister Jeremy Miles then issued a statement in which he labelled some of the claims about the policy "profoundly wrong" and "deeply dangerous".
Campaigners were granted a judicial review in May, when High Court judge Mr Justice Turner said the issues raised on behalf of the claimants "involve the consideration of complex constitutional matters with potentially very significant consequences for both parents and children".
Head teachers' union NAHT Cymru has welcomed the ruling.
"NAHT Cymru firmly believes that allowing children to learn about religion, relationships and sexuality will enable them to safely and successfully navigate life outside of school," said director Laura Doel.
"We must give this generation of learners the opportunity to learn about themselves and others."
The Welsh Conservatives said parents should have the right to choose to withdraw their children from RSE lessons.
The party's education spokeswoman, Laura Anne Jones MS, said: "We understand the plight of the parents in seeking to do this via the courts, but understand and respect the judge's decision today.
"However, this is a discussion that needs to be had and the concerns of parents need to be heard."
It was confirmed during the hearing in May that the judicial review would be held on 15 and 16 November before Mrs Justice Steyn.