I’m actually kinda scared

Two weeks ago my boyfriend fingered me and it was fine, didn’t hurt, didn’t bleed. This was on a Sunday. Well on Wednesday I noticed I was peeing a lot more and it burned a little and I felt pressure. I also had the urge to go to the bathroom even when I just went and I noticed there was a little blood in my urine. So I thought I had a uti. I told my mom and I went to urgent care. They told me it wasn’t a uti and it did show blood, they didn’t exactly tell me what it was. so I went to my primary doctor and they said the same, except there wasn’t blood ( this was by the end of the day). But the next day I didn’t have these symptoms anymore and all was fine. A few weeks latter my boyfriend fingered me again, same thing happened. A few days after only for one day I had blood in my urine and pressure when going to the bathroom. We’ve had unprotected sex a long time ago, like 3 months but we’ve used condemns since. I was wondering if it was a sti but wouldn’t I have gotten these symptoms a while back since we’ve been protected? I’ve only had this happen the last two times. Has this ever happened to anyone? Or do you have an idea of what it could be? Ps. Sorry for the long post