Thank you for your question.
Blood in the semen is called hematospermia. This condition though alarming, is a very common symptom, and is most commonly due to benign conditions such as inflammation within the male reproductive tract (prostatitis or seminal vesiculitis), but can also be due to infection. Inflammation of the gland (prostatitis) can cause a tear in one of the fragile veins of the prostate gland predisposing to bleed.
Hematospermia often resolves on its own, but even one episode of bleeding into the seminal fluid will take a few weeks to clear up completely.
However, if the hematospermia is persistent (>2 months without any defined cause) then there is some concern.
However in your case, this episode is likely to be benign and harmless, and you have no reason to be worried.
You can just have a physical examination by a doctor and if required a scan to know more about the health of the prostate.
Did I answer your question? Please reply.