Transitioning from fossil fuels to renewable energy ensures a sustainable and green future by limiting greenhouse gas emissions and their nuisance effects. This study proposes a polygeneration system that harnesses renewable energy to produce multiple energy vectors simultaneously and equipped with storage to mitigate the impact of intermittent weather. To perform dynamic analysis, proposed system has been modeled, optimized, and simulated using the transient simulation software TRNSYS®. The designed model has been optimized in GenOpt, linked with TrnOpt, under the weather conditions of Gujrat, Pakistan. The power system is energized by solar photovoltaic, thermal and wind power to produce cooling, heating, electricity, hydrogen, and oxygen as energy vectors, and also provides electric, hydrogen, and thermal storage. Prime movers utilized for energy conversion consists of evacuated glass tube collector, photovoltaic panels, wind energy conversion system, fuel cell, electrolyzer, and absorption chiller, which facilitate air-conditioning, space and water heating, electric power supply for electric vehicle, building load & national grid, hydrogen for internal combustion engines, fuel cell electric vehicle and industrial applications, as well as oxygen for hospitals. The study has shown that thermal collector has 68% efficiency, a solar fraction 0.78, peak outlet temperature 143.77 °C, and generates a total 1399656.25 kJ thermal energy. The wind and photovoltaic systems have maximum efficiencies values 52.24 % and 10.90 % respectively, resulting in the production of 44.8 MWh electric energy. Embracing the synergy of solar and wind power in a polygeneration system holds the key to a sustainable and eco-friendly future.