Sperm dying INSIDE

I went to my first fertility doctor today. I’m currently ovulating and the DR told us to have sex the night before so during my appointment he could collect a sample inside me to see if the sperm is alive. Turns out there not. My husband had to give a sample witch they were alive! Just dying inside of me after sex. Unfortunately the doctor didn’t go into a ton of detail to why this was happening, he just suggests IUI... witch we ended up doing.

Has anyone else had this problem? What’s the cause of this? Did you do anything to fix it? I’ve heard it could be the women’s PH or something to do with the men’s sperm..