The objective of this work is to devise an effective control system for addressing the trajectory tracking challenge in nonholonomic mobile robots. Two primary control approaches, namely kinematic and dynamic strategies, are explored to achieve this goal. In the kinematic control domain, a backstepping controller (BSC) is introduced as the core element of the control system. The BSC is utilized to guide the mobile robot along the desired trajectory, leveraging the robot’s kinematic model. To address the limitations of the kinematic control approach, a dynamic control strategy is proposed, incorporating the dynamic parameters of the robot. This dynamic control ensures real-time control of the mobile robot. To ensure the stability of the control system, the Lyapunov stability theory is employed, providing a rigorous framework for analyzing and proving stability. Additionally, to optimize the performance of the control system, a genetic algorithm is employed to design an optimal control law. The effectiveness of the developed control approach is demonstrated through simulation results. These results showcase the enhanced performance and efficiency achieved by the proposed control strategies. Overall, this study presents a comprehensive and robust approach for trajectory tracking in nonholonomic mobile robots, combining kinematic and dynamic control strategies while ensuring stability and performance optimization.