Tmi*** I coughed up blood

I have been sick since sept 14th. My two kids have been too. But my oldest is finally better a few days ago. And my baby started feeling better yesterday. Around sept 29th I felt like I was getting better, but then the next day I started feeling bad again. I have gone to urgent care 3 times. The first two they said it was just a cold or allergies. And three days ago they did an X-ray and said everything looked fine, it’s just an acute upper respiratory infection.

Yesterday I started coughing phlegm up from my throat.

This morning I coughed up bloody phlegm.

Do you think that is just from my coughing and most likely from my nose? Should I go back to see a doctor? Or the ER?