Personally unless the wiring is straight forward swap I get a qualified electrician.Had light fittings replaced in four rooms,one of which had two fittings two out let’s controled by a switch in the kitchen and a double switch in the lounge which also controlled the lighting to the stairs
Cost £50 and pease of mind job had been done correctly.If your not sure don’t mess with electrics.