The integration of distributed generations (DGs) in power systems poses challenges in coordinating protection devices originally designed for a centralized generation. This study examines numerous scenarios for choosing and coordinating protection systems in presence & absence of DGs and provides a thorough analysis of how DGs impact protection coordination. The technique takes into account a variety of relay attributes and use Teaching Learning Based Optimization (TLBO) algorithm to ascertain ideal relay configuration that will enable most efficient coordination. Optimization techniques are employed to optimize the zones of distance relays and ensure a suitable coordination time interval (CTI) [0.2 sec or more]. Simulation results on real-time networks, such as the IEEE-9 and IEEE-30 bus test systems, demonstrate the effectiveness of the method in achieving optimal coordination. TSM and over-current relay characteristics are found for various cases and uniform values in every situation to prevent relay resets. Using the TSM and Characteristics values operating time of overcurrent relays and the operating time of the second zone of distance relays are found. The simulation outcomes showcase the ability of the method used to generate practical and feasible solutions.