Smart grids are a cornerstone of the transition to a decentralised, low-carbon energy system, which offer significant benefits, including increased reliability, improved energy efficiency, and seamless integration of renewable energy sources. However, ensuring the security and resilience of smart grids is paramount. Cyber attacks, physical disruptions, and other unforeseen threats pose a significant risk to the stability and functionality of the grid. This paper identifies the research gaps and technical hurdles that hinder the development of a robust and secure smart grid infrastructure. This paper addresses the critical gaps in smart grid security research, outlining the technical challenges and promising avenues for exploration by both the industry and academia. A novel framework designed to enhance the reliability and security of smart grids was proposed against cyber attacks, considering the interconnectedness of the physical and cyber components. The paper further explores future research trends and identifies the key open issues in the ongoing effort to strengthen the security and resilience of smart grids.