Text this: Influence of the magnetic field and impurity on the commensurate–incommensurate phase transition in a quasi-two-dimensional magnetic system