This work seeks to use both traditional control algorithms and advanced optimization algorithms to enhance the performance of a DC-DC converter. The chosen algorithm was Proportional-Integral-Derivative (PID) based on gray wolf optimization (GWO). The PID controller is known for its ease of control and wide range of industrial applications. This type of controller has been used successfully in many types of systems, such as power electronics, automation systems, robotics, etc., due to its ability to effectively optimize the system's parameters with minimal effort from the user. To test this new technique on a DC-DC converter, different simulations were conducted using a MATLAB environment where various parameters that can simulate various uses for the DC-DC converter within electrical systems were set. After conducting these tests, it was found that PID based on GWO controller had good performance (rise time 0.0004 sec, settling time 0.0001sec) when compared with other traditional controllers (increase time 0.00416 sec, settling time 0.000323sec), reliability, efficiency, higher accuracy, low cost, etc. As expected, GWO showed better results than conventional methods like PID or PI controllers due to the fact that it's an evolutionary approach that allows more flexibility during the configuration process.