You ran a red light. It is that simple. A yellow light means the light is. Hanging to red And you should do so unless unsafe. It does not mean ‘I think I can make It before the red, go!’
Simply said you were racing the light which is actually one of the most dangerous things out there