In this study, we introduce a visionary approach to sustainable urban energy systems by proposing a multi-carrier power grid or energy hub (EH) that seamlessly integrates electric and gas sources. Our analysis spans the course of four distinct seasons, where we meticulously scrutinize the dynamic demand profiles encompassing power, heat, and cooling power. Our findings reveal significant season-dependent variations in the performance of the EH system, highlighting the propensity for heightened energy consumption during warmer seasons, primarily driven by cooling needs, while a contrasting trend emerges during colder seasons with an emphasis on heating requirements. Furthermore, we investigate the pivotal role of user engagement in demand response programs, elucidating how their active participation results in a notable reduction in overall power consumption, particularly during the warmer months, thereby reshaping energy utilization patterns. To address the intricate optimization challenges inherent in this multifaceted urban energy ecosystem, we introduce the innovative balanced seagull optimization algorithm, which offers an effective solution. Leveraging simulations of the EH system, which harnesses the potential of solar and wind power sources, our study demonstrates compelling outcomes, including amplified EH profits, a decrease in energy system costs, and a reduction in social welfare expenditures. This multifaceted examination underscores the complex interplay between policy decisions, the imperative for sustainable urban energy solutions, and the ever-evolving political-economic landscape. As we navigate toward a more sustainable and resilient urban energy future, this research provides invaluable insights that empower policymakers, urban planners, and stakeholders to make informed decisions for the benefit of society and the environment.