The profound impact of excited magnetic states on the intricate interplay between electron and lattice behaviors in magnetic materials is a topic of great interest. Unfortunately, despite the significant strides that have been made in first-principles methods, accurately tracking these phenomena remains a challenging and elusive task. The crux of the challenge that lies before us is centered on the intricate task of characterizing the magnetic configuration of an excited state, utilizing a first-principle approach that is firmly rooted in the ground state of the system. We propose a versatile self-adaptive spin-constrained density functional theory formalism. By iteratively optimizing the constraining field alongside the electron wave function during energy minimization, we are able to obtain an accurate potential energy surface that captures the longitudinal and transverse variations of magnetization in itinerant ferromagnetic Fe. Moreover, this technique allows us to identify the subtle coupling between magnetic moments and other degrees of freedom by tracking energy variation, providing new insights into the intricate interplay between magnetic interactions, electronic band structure, and phonon dispersion curves in single-layered CrI3\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$\\mathrm{CrI} _{3}$\\end{document}. This new methodology represents a significant breakthrough in our ability to probe the complex and multifaceted properties of magnetic systems.