The increasing adoption of electric vehicles (EVs) has led to a significant rise in the demand for efficient and sustainable charging infrastructure. Managing the energy supply to meet this growing demand while ensuring grid stability presents a critical challenge. This paper presents an energy management system designed for electric vehicle charging infrastructure that balances demand and supply in real time. The proposed system dynamically allocates available power to connected EVs based on their charging demands and the total power available, ensuring optimal utilization of energy resources. By simulating various scenarios, the system demonstrates its capability to prevent overloading, efficiently distribute power, and prioritize critical energy needs. The results of the simulation show that the system can effectively manage power distribution, reduce peak load impact, and enhance the reliability of EV charging networks. This approach offers a scalable and adaptable solution for integrating EVs into the existing power grid, contributing to the development of smart and sustainable transportation systems.