Due to COVID-19, the spread of diseases through air transport has become an important issue for public health in countries globally. Moreover, mass transportation (such as air travel) was a fundamental reason why infections spread to all countries within weeks. In the last 2 years in this research area, many studies have applied machine learning methods to predict the spread of COVID-19 in different environments with optimal results. These studies have implemented algorithms, methods, techniques, and other statistical models to analyze the information in accuracy form. Accordingly, this study focuses on analyzing the spread of COVID-19 in the international airport network. Initially, we conducted a review of the technical literature on algorithms, techniques, and theorems for generating routes between two points, comprising an analysis of 80 scientific papers that were published in indexed journals between 2017 and 2021. Subsequently, we analyzed the international airport database and information on the spread of COVID-19 from 2020 to 2022 to develop an algorithm for determining airport routes and the prevention of disease spread (DetARPDS). The main objective of this computational algorithm is to generate the routes taken by people infected with COVID-19 who transited the international airport network. The DetARPDS algorithm uses graph theory to map the international airport network using geographic allocations to position each terminal (vertex), while the distance between terminals was calculated with the Euclidian distance. Additionally, the proposed algorithm employs the Dijkstra algorithm to generate route simulations from a starting point to a destination air terminal. The generated routes are then compared with chronological contagion information to determine whether they meet the temporality in the spread of the virus. Finally, the obtained results are presented achieving a high probability of 93.46% accuracy for determining the entire route of how the disease spreads. Above all, the results of the algorithm proposed improved different computational aspects, such as time processing and detection of airports with a high rate of infection concentration, in comparison with other similar studies shown in the literature review.