In Pakistan, tuberculosis (TB) is still a significant public health concern. To address the socioeconomic and healthcare issues in the Khyber Pakhtunkhwa (KPK) province, this study offers a novel mathematical model of tuberculosis transmission. To the best of my knowledge, this is the first optimal control study of SVEITR-TB dynamics in KPK, Pakistan, incorporating both classical and fractional-order modeling frameworks to capture memory effects and complex disease behavior. Model validity is ensured through existence and uniqueness analysis, and the basic reproduction number \(\mathbf{R}_0\) is used to predict future disease dynamics. Model stability is assessed using Routh-Hurwitz criteria, Castillo–Chavez theorem, and Lyapunov functions for disease-free and endemic scenarios. In addition, backward bifurcation analysis is discussed near the bifurcation point. A sensitivity analysis is conducted to identify the key parameters that affect disease spread. The Nonstandard Finite Difference (NSFD) technique is used for numerical simulations of the deterministic model, and the fractional RK2 approach is used to simulate the fractional-order formulation, showing the disease can be controlled over time. The findings show that the fractional RK2 scheme successfully captures the memory effects present in the fractional-order dynamics and improves numerical accuracy. Furthermore, optimal control strategies, including enhanced vaccination and enhanced treatment, are assessed using Pontryagin’s maximum principle. Simulations using the RK4 forward-backward sweep method show that strategy A is the most reliable for controlling TB among the control measures, with a highest cumulative efficiency index. This demonstrates that strategy A is the most suitable control measure, providing the greatest reduction in disease burden. Thus, we conclude that stockholders and policymakers can use strategy A to control TB in the future.