We need to know what cables/conductors you have at both light fitting and switch.
Did the the light switch on/off prior to switch replacement? or did replace both fitting and switch at same time, therefore the fault could be at either and/or both fitting and switch.
It sounds very much like you have looped in the permanent live, to the switch live side of the light fitting.
At the light fitting you will have perm live conductors, neutrals, switch line and earths. The neutral conductors always go to the neutral terminal, but be aware that colour cores that a black/blue do not always represent a neutral conductor. As some are switch line and ideally should be identified as these by sleeving or marking as a line conductor.
The confusion is with the loop in system, having a live permanent loop and a switch line.
A lot of manufacturers do not offer a spare way/loop terminal at the fitting, and as a DIYer this will often lead you to believing all live/line conductors are connected to the live terminal of the fitting, which it should not as this will not allow you to have a switch function and thus the lamp will be permanently energised.
So you need to manufacture a separate connection via a terminal connector, to create the loop in configuration, this will contain the permanent live conductors (in and outs, could be more than one of these)
The conductor that goes to common of your switch (often red/brown).
There will then be left over a switch line (depending on colour cores, this could be commonly red, brown, black, blue, but should be ID as the switch line by marking) and this is the conductor that goes to the live side of the fitting. if you have now mixed this up, the best and safe method to identify the cores would be by safely testing them rather than randomly swapping them about.