Nokia secret codes found online do work and are in fact codes for Nokia technical service staff to use when troubleshooting Nokia devices. There are no set of codes that apply to all Nokia phones, as different models can have different codes altering different features.
Nokia secret codes can partially or fully harm your device, and you should exercise extreme caution when using them. Similarly, using these codes can void the warranty of your device. The websites that share secret codes accept no responsibility should you break your phone. There are codes that unlock your phone from service providers, and they are considered illegal according to the Unblocking Consumer Choice and Wireless Competition Act.