There is a tendency in our culture to put a lot of parameters around acceptable behavior. Sexual behavior is especially prone to this. As an author the choices that make sense for your story and your characters are up to you. My goal here is to make sure you have fully considered those choices.
It may seem odd that I have lumped together pregnancy, infection, and disease. I have done so because all three of these are possible results of sexual behavior. Some characters may wish for one of these outcomes over the other, or may feel any one of them is unwanted.
Characters in your book may be jerks with misinformation about pregnancy, infections, and/or disease. Your job as an author is to both be aware of the culture that surrounds that, and – unless your intention is to support those beliefs – have the story counter that. There are a number of ways to achieve this, through supportive side characters, through the POV character’s inner monologue, and so on,
If one of your characters contracted a sexually transmitted infection (STI), it can be something that is uncomfortable for them (on multiple levels), something they struggle to find the correct words to disclose to their partner. But, I personally, would love to see more characters who have had an STI and don’t consider it is because they were bad, their partner was bad, or anything else. Sure, they can regret not having used a different form of contraception that day.
Similarly, characters who have been pregnant, regardless of whether they carried that pregnancy to term or not, should not consider the pregnancy a moral judgement. It may have really changed their life plans, it may have clarified their feelings about the relationships they were in, all of that is totally fair.
But pregnancies are neither punishments nor rewards.
Similarly, if you have a character having trouble conceiving, they may absolutely have days where they wish they could change things by dancing under the light of the moon, or otherwise changing their behavior.
Your story should be clear that infertility is not a judgement.
And all these cases the characters may operate in a society that judges these results very harshly. Also, I can hear a few of you saying, well, absolutely, after the bleak moment they will suddenly realize that they had been wrong about that wrong thing.
And yes, that is an option. I would suggest adding content warnings in that case. Some of your readers don’t need to be smacked in the face with the judgments they get enough of in real life.
Also, if you feel that you don’t have time to counter these societal judgements in your story, that’s fine. I suggest taking a close look to make sure your story doesn’t have anything in it that would need countering. Or considering why it’s important to your story to have characters that are wrong and not counter that. It may be what your story needs. But as mentioned previously, you cannot count on your readership to have consistent and complete factual information. While fiction is not a substitute for that, consider treating it as you would other aspects of the world you would not expect your audience to already know about.