I will guess one cable is "Line in" "Neutral" and "Earth" and the other cable is "Line out to switch" "Line return from switch" and "Earth".
The "Line" wires should be brown or red although since both "Line" and "Neutral" are both "Live" wires it is permitted to sleeve the blue or black wire with brown or red sleeves. Often these fall off and then easy to get mixed up unless you note connections before disconnecting any cables.
So I expect the two red or brown wires connect together and one black or blue goes to neutral and the other goes to Line.
I would also expect when you switch light on it opens the protective device. If not then likely the switch is US.
DIY how to tutorial projects and guides - Did you know we have a DIY Projects section? Well, if no, then we certainly do! Within this area of our site have literally hundreds of how-to guides and tutorials that cover a huge range of home improvement tasks. Each page also comes with pictures and a video to make completing those jobs even easier!