You have 4 cables each with three conductors inside a red, a black and a earth.
The earths should be insulated with green and yellow sleeving.
Then terminated together at the earth terminal of light fitting or ceiling rose.
The four blacks 3 will be neutrals and one will be returning from your switch should be marked up with red tag/flag, sometimes this is has not been done and makes live harder.
If one is flagged up then connect that to the live terminal on fitting or rose nothing else should be with this.
The remaining blacks go to neutral terminals on fitting or rose.
The four reds are all connected together if it's a rose they go to the loop terminals if it's a fitting and no spare terminals for them a plastic connection block needs to be used, you may need to purchase one.
They (reds) are all connected together.
That should work.
If not may need a multimeter to identify switch wire this is one of the blacks, you can swap them about one at a time into the live terminal on fitting until it does work correctly(don't confuse the live of fitting/rose with the loop in connection of the reds)
If you have any problem understanding this reply, get back in touch, there is a diagram in project pages showing configuration for replacing a light fitting may be helpful. It's for three cables rather than four but it will give you an idea
Link
https://www.diydoctor.org.uk/projects/re ... itting.htm
regards
KB