L2 β-lactamases, serine-based class A β-lactamases expressed by Stenotrophomonas maltophilia, play a pivotal role in antimicrobial resistance (AMR). However, limited studies have been conducted on these important enzymes. To understand the coevolutionary dynamics of L2 β-lactamase, innovative computational methodologies, including adaptive sampling molecular dynamics simulations, and deep learning methods (convolutional variational autoencoders and BindSiteS-CNN) explored conformational changes and correlations within the L2 β-lactamase family together with other representative class A enzymes including SME-1 and KPC-2. This work also investigated the potential role of hydrophobic nodes and binding site residues in facilitating the functional mechanisms. The convergence of analytical approaches utilized in this effort yielded comprehensive insights into the dynamic behavior of the β-lactamases, specifically from an evolutionary standpoint. In addition, this analysis presents a promising approach for understanding how the class A β-lactamases evolve in response to environmental pressure and establishes a theoretical foundation for forthcoming endeavors in drug development aimed at combating AMR.