Urban transportation systems are essential in fulfilling the requirements of residents while guaranteeing the normal functioning of cities. These systems encompass various modes of transportation, infrastructure, and services that enable people to move within and between urban areas. However, the challenges posed by escalating urbanization, particularly the growing menace of traffic congestion, underscore the pressing need for effective solutions. We propose an Adaptive and Dynamic Spatio-Temporal Network (ADSTN) as an innovative solution to the complexities associated with traffic congestion. The identified shortcomings in existing models, such as their limitations in capturing authentic spatial dependencies, insufficient understanding of the heterogeneous relationship between the temporal and spatial domains, and the oversight of local trend information, motivate the development of ADSTN. The model integrates three key components: a learnable adaptive attention module, a local temporal self-attention block, and a spatio-temporal dynamic graph convolution block. ADSTN stands out for its outstanding performance in handling local spatio-temporal dependencies, periodicity, and dynamics within traffic flow forecasting. Evaluation on three public real-world datasets underscores competitive achievements of ADSTN contrasted to state-of-the-art models, all while maintaining computational efficiency.