Hi OP! Sorry I cannot figure out how to type your name. Something to try to remember "hurt feelings do not always go away after apology".
*Required lecture over.
Look, I will give him the benefit of the doubt that he is young and he still has air bubbles in his brain. STILL ^^ There is never ever never ever a reason to say what he said. Did he apologize? There are things you can joke about in relationships and things you just don't. One is you just don't make jokes about infidelity because that is what a relationship is all about. Trust is the glue well sort of that holds a relationship together. A relationship should be a safe space where you can be you without condemnation. A relationship should just be a safe space.
Everybody is sanative about somethings more than others and he need to learn that and stay away from those topics. Doing that is called respect. He needs to learn to have respect to you limits.
There is a once very popular lingerie store called Victoria's Secret. If your boyfriend came over for the weekend if you are over 18 and you had been bust playing video games instead of cleaning up for him and you had dirty underwear every he could say- Geez OP your apartment looks like a Victoria's Secret store when it closes after a Black Friday sale.
Do you see the difference. What he said was designed to hurt your feelings and that is never right. My example was designed to hurt your cleaning habits.
Do you see the difference?
It all comes with relationship experience. If a girl friend said to me what he said to you, I would say, "Fine then go fu king be with her". get up and walk away. Don't scream and howl just get up and walk off and let him come running after you apologizing.
There are limits to speech. For example, my wife is kind of bossy even though she means well. Her father was a mean tyrant. One day I said "You are just like your father. You try to run minute details of everyone's life". She screamed back, "I am nothing like my father and don't ever say that again". It went past her limits. So the next time I got irritated and her I said, "You are bossy like that cow MOO MOO MOOOOOOOOOO!" There was a famous cow on Bordon food commercials that had a talking cow cartoon character that always told you to buy that product.
Just remember next time instead of blowing up at him, stay calm and say- "You know I am sensitive about trust issues Please do not make jokes about that". A soft voice turns away wrath, my mom used to say. But back to example- he learns your limit, he learns he must respect your limits,
It is easier said than done. In time you both will get over it. Hopefully. I hope this helps and made you feel better.
Tell him Look we have a lot to learn about relationships and each other. Tell him we both need to learn to be careful because in the end all we really have is each other.