Leveraging AI and Intelligent Reflecting Surface for Energy-Efficient Communication in 6G IoT