The Schrödinger equation has been solved in two dimensions for the modified Yukawa–Kratzer potential (MYKP) under the influence of the magnetic field and the Aharanov–Bohm flux field (external fields). The energy eigenvalues and wave function were calculated using the parametric Nikiforov–Uvarov approach. From the resulting energy eigensolution of MYKP, we calculated energy eigenvalues for generalised Kratzer potential (GKP), modified Kratzer potential (MKP), Kratzer potential (KP), and Hellmann potential (HP). The energy values for MYKP, KP, MKP, and GKP are tabulated numerically. Under the impact of external fields, we explore different thermodynamic parameters such as partition function, mean energy, mean free (internal) energy, entropy, specific heat capacity, magnetization at finite temperature, and magnetic susceptibility at finite temperature. Plots of the effective potential, energy eigenvalues, and thermodynamic properties for various parameters were provided. The calculated numerical results for KP and HP under the effect of the magnetic field and the Aharanov–Bohm flux field are quite close to those obtained by others. In addition, MYKP also solves the Schrödinger equation using the series expansion method. It is possible to get confined state energy spectra. For distinct n,m quantum numbers for q=1\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$q=1$$\end{document}, numerical values of energy spectra of special cases Kratzer potential for N2\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$N_2$$\end{document} and CH molecules are computed, and the findings are consistent with NU method.