The Smart Grid, a fusion of digital technologies and advanced communication methods, enables the transformation of power distribution, transmission, and generation by responding to fluctuations in electricity consumption. Conventional electrical grids often leave consumers unaware of their energy usage patterns, resulting in both energy wastage and financial loss. To enhance energy efficiency, the consumption patterns of consumers need regulation. Smart Grids efficiently employs Demand-Side Management (DSM) strategies, including peak clipping, load shifting, and consumer awareness campaigns, to optimize energy consumption and achieve energy savings. DSM's synergy with smart meters and smart energy management systems (SEMS) emerges as a powerful trio in comprehensive energy conservation and optimization. The integration of SEMS with the Internet of Things (IoT), augmented by the advancements in 5G technology, emerges as a transformative paradigm. SEMS, operating within the IoT ecosystem bolstered by 5G connectivity, facilitates the instantaneous and efficient integration of IoT in SEMS, enabling real-time data collection, in-depth analysis, and data-driven decisions for optimal energy management. This empowers users with the ability to make data-driven decisions, yielding tangible outcomes in the form of efficacy, cost reductions, and fortified sustainability initiatives. We present a SEMS that amalgamates three microcontroller units to create a smart meter that is further integrated with a cloud-based middleware module and consumer API. Furthermore, it collects vital power metrics such as voltage, current, kWh, kW, and PF. Consumers can conveniently access this data in real-time via an API. Energy service companies can leverage this data for incentive programs and to motivate customers to optimize their energy consumption. These datasets serve as a foundational element for the development of diverse DSM strategies. This research work presents the deployment, and performance evaluation of an IoT-based SEMS that is implemented in diverse settings, including industrial, commercial, building, and warehouse setups. Moreover, as a test case, our evaluation extends to the specific conservation of energy within air-conditioning systems. The SEMS achieves significant energy conservation, with calculated savings ranging from 5% to 53%, showcasing its effectiveness in targeted energy management. The real-time data and case studies further demonstrate the efficiency of the presented work.