Is this still happening? Blood in urine and after sex obviously could be bleeding from the urethra or prostate. Rough sex can cause it. (since you mention intercourse, thought I'd mention that). Here is a list of things that can cause this:
Vigorous exercise, such as long-distance running
Vigorous sexual activity
Urinary stones
Trauma
Urinary tract infection (UTI)
Certain medications, including aspirin and other pain relievers, blood thinners, and antibiotics
Idiopathic: This is the term for an unknown cause. Despite numerous investigations, the cause of hematuria is frequently unknown.
There are a few more serious reasons for it (stones, cancer, autoimmune condition).
That you have this right after sex kind of indicates that sexual activity triggers it. It's likely benign but not great.
I'm hoping it's better by the time you've read this.