Green building, net-zero energy building, low energy building, and sustainable building are the common terms being used in the building industry nowadays, with the primary aim to produce buildings with low energy and low carbon dioxide (CO2) emissions. Different types of building materials can have significant implications for energy efficiency, especially in the warming climate. The energy crisis, future global warming, and climate change can be mitigated by choosing the right building materials, which will also lower the building's energy consumption and carbon dioxide emissions. This paper presents the effects of different building materials on the cooling capacity and cooling energy consumption of a building for four (4) different climate change weather data, namely, the present time scenario, the 2020s, 2050s, and 2080s time scenario using TRNSYS simulation software. The main library of a university in Petaling Jaya, Malaysia, was chosen as the case study. Three (3) types of building materials were studied, namely, Type 1 (brick walls with single-glazed windows), Type 2 (foam insulation cavity walls with double-glazed windows), and Type 3 (air gap cavity walls with double-glazed windows). The simulation results showed that the Type 2 building materials could reduce the yearly cooling energy consumption by 14.5%, compared with the current building materials (brick walls with single-glazed windows). The Type 3 building materials (air gap cavity walls with double-glazed windows) with the lower installation were wound to reduce the yearly cooling energy consumption by 9% compared with the Type 1 building materials. For architects, designers, politicians, and library administrators, the research's conclusions have immediate practical implications that will help them make decisions and implement energy-saving plans. In the end, this research helps libraries in Malaysia remain sustainable and resilient in the face of global warming and the energy crisis.