The pharmaceutical supply chain is a multilayered and complex structure designed to deliver medicines to customers in a timely manner while ensuring optimal quality and quantity of medicines. The COVID-19 outbreak exposed the vulnerability and uncertainty of the pharmaceutical supply chain, so managing the risks in the pharmaceutical supply chain has become particularly important. This study demonstrates that digital twin (DT) technology can improve pharmaceutical supply chain agility and reduce the ripple effect caused by disruptions. The ripple effect refers to the effect that a sudden disruption at one node in the supply chain has on causing a chain reaction in the rest of the supply chain. The most used risk management method today is the Enterprise Resource Planning (ERP) system, which allows for real-time data sharing but has limitations in predicting and modeling the entire supply chain and lacks the ability to make quick decisions and simulate the entire supply chain. DT technology creates a virtual model of the supply chain, which enables continuous communication and information exchange between real assets and the virtual model, offering a promising alternative to risk management for pharmaceutical supply chains. risk management by providing a promising alternative. This study utilizes the AnyLogistix platform to construct a DT model and demonstrates the effectiveness of DT technology in reducing ripple effects and improving supply chain agility using quantitative analysis. This paper focuses on analyzing the pharmaceutical supply chain for 75mg aspirin tablets in London. A supply chain that operates normally, a supply chain that introduces a disruptive event (closure of the logistics center due to an earthquake), and a supply chain that applies a proactive strategy (activation of an alternate logistics center) to mitigate risk are simulated separately. The positive impact of DT technology on the supply chain is evaluated by analyzing the methods of key performance indicators (KPIs) such as inventory level, order fulfillment rate, and delivery time. The experimental results show that DT technology enhances the responsiveness, flexibility, speed, and proactivity of the supply chain, which significantly improves the agility of the supply chain. Proactive and effective strategies also reduce the financial impact of disruptions and service levels are quickly recovered. In addition, the proactive strategy stabilized inventory levels and reduced delayed orders. The above key metrics confirm the hypothesis that DT technology can improve supply chain agility and effectively reduce the ripple effect. Despite the significant conclusions drawn in this paper, there are some limitations. Firstly, sensitivity analysis and t-test were not used in the study for secondary testing, which resulted in the lack of reliability of the validation results. In addition, the possible interaction between the ripple effect and the bullwhip effect was not discussed, leading to a confounding factor in the experimental results. The above issues can be considered in further research in the future. Finally, this paper explores the possibilities and uses of introducing machine learning techniques and considers the supply chain risk factors of globalization. In summary, this study validates the potential of digital twin technology in improving agility and coping with ripple effects in pharmaceutical supply chains. As research continues, DT technology is expected to improve supply chain efficiency and reduce supply chain risk while ensuring patient safety.