Yes your older installations have to comply with rules as of date of installation. This means a repair has to be like for like, so you can replace a switch, socket or light fitting with an identical function one, but if you do an upgrade the upgrade has to comply with current regulations. So, you can have a switch in the bathroom, and it fails, so replace with exactly the same model (or equivalent manufacturers model) switch, but if you say want to install a light dimmer that needs to have the modern standards apply, so is going to need rather a lot of work. Same for the light fitting, you cannot replace with a LED fitting without all new standards applying, but you can replace the lamp screwed or plugged into the socket inside the fitting with CFL or LED no problem, as they are not part of the fixed installation. Shaver socket you have to replace with one, not a regular socket, unless it is not in the wrong zone, and is connected to a RCD protected feed.
Also if you have an old house with 5A round sockets on the floor, you can only replace with another 5A socket on the floor, probably with an upgrade of having a switch, but still a 5A socket. If you want 13A/16A socket outlets you have to bring the installation up to current spec, which will probably involve removal of the old gutta percha wire and pulling new PVC cable in, with a separate ground wire, as the regulations now prohibit using the conduit as ground, to get the insulation resistance up to the modern standard. Then you need to have modern breakers and RCD devices for the new circuit, to comply with current regs, installed in a housing to the current regulations. Gets very expensive, as you are then basically rewiring the entire house to fix one fault, as disturbing the old gutta percha wire will cause multiple faults from brittle insulation.
Just did that this weekend, to replace 2 light fixtures from a failed cable. 33m of new cable through the conduits, new fixtures, and new covers for the old junction boxes, and good luck finding BA size screws in long lengths for those 60 year old boxes. Just glad I am not the electrician who cut the cable I fixed, he now has to replace 50m of 16mm mains feed wires in another steel conduit, and the bet is that they will not pull out of that conduit they have spent the last half century in without a fight. Will probably need 70m of Airdac cable instead, to go the long way through ducts, as that cable is cheaper than direct burial armoured cable